8000 GitHub - desker/json-script: Convert json to correct js. Object definition syntax in box :)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Convert json to correct js. Object definition syntax in box :)

Notifications You must be signed in to change notification settings

desker/json-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON-script

(Still) concept for run json as native js. JSON must be valid json-script-syntax object.

Idea

Syntax

var root = this;
["var", {"root": "this"}]
[
  {
    "var": {
      "a": 10,
      "b": {"calc": ["a","*",10]},
      // or
      "c": {"calc": "(a+b)/3"},
      "d": {"require": "gulp-load-plugins"}
    }
    }
  }
]

Syntax v 0.0.1

(function(root) {
  
  var timer = {
    _startTimer: function() {
      if (!this._timer)
        this._timer = setTimeout()
    }

    start: function(reset) {
      reset && this.reset();
      this._startTimer();
    }
  }

})( window || (module || null) );

About

Convert json to correct js. Object definition syntax in box :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0