Giter Club home page Giter Club logo

tweek.jpad's People

Contributors

alef83 avatar itaym2 avatar nataly87s avatar yshayy avatar zahic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tweek.jpad's Issues

Add support for matching complex properties

context data:

{
	"object": {"hello": "world"},
    "array": ["abcd", "efgh"],
    "complex" : [{list:[{item:"abcd"}]}]
}

example (object):

{
    "partitions": [],
    "valueType": "bool",
    "rules": [
        {
            "Matcher": {
                "object.hello": "world"
            },
            "Value": true,
            "Type": "SingleVariant"
        }
    ],
    "defaultValue": "default_value"
}

example (array):

{
    "partitions": [],
    "valueType": "bool",
    "rules": [
        {
            "Matcher": {
                "array[_]" : "abcd"
            },
            "Value": "true",
            "Type": "SingleVariant"
        }
    ],
    "defaultValue": "true"
}

example (complex)
can be combined:

{
    "partitions": [],
    "valueType": "bool",
    "rules": [
        {
            "Matcher": {
                "complex[_].list[_].item" : "abcd"
            },
            "Value": "true",
            "Type": "SingleVariant"
        }
    ],
    "defaultValue": "true"
}

Add ability to get JPad rules count

Add support to get JPad rules total count when passing JPad file or providing JPad url.

Suggested solution:
NPM client that will provide some utils functionality for JPad files.

Add null/none protection in rule evaluation

Probably should be something like:
Null eq None/Null -> True
Null neq None/Null -> False
Any neq None/Null -> True
Any AnyOp None/Null -> False

A bit like undefined comparison in js

LLVM tagret?

It'll be an interesting experiment to create a compiler that compiles the JPad AST to LLVM IR.

Add support for other JsonValue types in weighted args

Currently, the JPad json format support only strings in multi-variant weighted keys.
Allow new syntax for supporting other Json values:

current

{
    args: {
         a:40,
         b:60
    }
}

Suggested new additional syntax:

{
    args: [{
         value: 5
         weight: 40
    },
    {
          value: 10,
          weight:60
    }]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.