Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jast-1.0.0b1-py2.py3-none-any.whl (8.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file jast-1.0.0b1.tar.gz.

File metadata

  • Download URL: jast-1.0.0b1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for jast-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 ebc2bc9a7c3870027f510d2b5e100a6c93e87ee04adec12c7ffbf612e5d07323
MD5 b46d5ea35682ff7f44c38f94436066d7
BLAKE2b-256 d9c5801cb588a0077d6970a5f128198467108ece452fed83162744cc15bc1bdc

See more details on using hashes here.

File details

Details for the file jast-1.0.0b1-py2.py3-none-any.whl.

File metadata

  • Download URL: jast-1.0.0b1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for jast-1.0.0b1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1b575142a156bc5d51cbdec2798d6d0f692454ebb7083de0d2a2d4d9a927d0c7
MD5 38669918a7a44fa304daac43d96442ef
BLAKE2b-256 551e079e67c9c7e5f9dae968d3c78d43fb1485020df241c1b867d83d0292673e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page