Construct javascript AST structures using python objects.
Project description
Construct javascript AST structures using python objects.
Requirements
Python 2.7
Setup
$ python -m pip install --user jast or (venv)$ python -m pip install jast
Usage
$ python >>> import jast >>> jast.Object({"a": 1, "b": 2}).ast() '{ "type": "ObjectExpression", "properties": [ { "type": "ObjectProperty", "method": false, "key": { "type": "Identifier", "name": "a", "definition": null }, "computed": false, "shorthand": false, "value": { "type": "NumericLiteral", "value": 1, "extra": { "rawValue": 1, "raw": "1" } } }, { "type": "ObjectProperty", "method": false, "key": { "type": "Identifier", "name": "b", "definition": null }, "computed": false, "shorthand": false, "value": { "type": "StringLiteral", "value": "2", "extra": { "rawValue": "2", "raw": "\"2\"" } } } ] }'
ChangeLog
1.0.0-beta (2019-02-07)
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jast-1.0.0b1.tar.gz
(11.3 kB
view hashes)
Built Distribution
Close
Hashes for jast-1.0.0b1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b575142a156bc5d51cbdec2798d6d0f692454ebb7083de0d2a2d4d9a927d0c7 |
|
MD5 | 38669918a7a44fa304daac43d96442ef |
|
BLAKE2b-256 | 551e079e67c9c7e5f9dae968d3c78d43fb1485020df241c1b867d83d0292673e |