flow-parser
JavaScript parser written in OCaml. Produces ESTree AST
Last updated 3 years ago by flowtype .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install flow-parser 
SYNC missed versions from official npm registry.

The flow-parser package

This package contains the Flow parser in its compiled-to-JavaScript form.

What is Flow

See flow.org. The code for the Flow parser lives on GitHub.

What is the Flow Parser

The Flow Parser is a JavaScript parser written in OCaml. It produces an AST that conforms to the ESTree spec and that mostly matches what esprima produces. The Flow Parser can be compiled to native code or can be compiled to JavaScript using js_of_ocaml. This npm package contains the Flow parser compiled to JavaScript.

Usage

You can use the Flow parser in your browser or in node. To use in node you can just do

require('flow-parser').parse('1+1', {});

To use in the browser, you can add

<script src="flow_parser.js"></script>

which will make the flow object available to use like so:

flow.parse('1+1', {});

Options

The second argument to flow.parse is the options object. Currently supported options:

  • all_comments (boolean, default true) - include a list of all comments from the whole program
  • comments (boolean, default true) - attach comments to AST nodes (leadingComments and trailingComments)
  • enums (boolean, default false) - enable parsing of Flow enums
  • esproposal_decorators (boolean, default false) - enable parsing of decorators
  • esproposal_export_star_as (boolean, default false) - enable parsing of export * as syntax
  • tokens (boolean, default false) - include a list of all parsed tokens in a top-level tokens property
  • types (boolean, default true) - enable parsing of Flow types
  • use_strict (boolean, default false) - treat the file as strict, without needing a "use strict" directive

Current Tags

  • 0.245.2                                ...           latest (2 months ago)

322 Versions

  • 0.245.2                                ...           2 months ago
  • 0.245.1                                ...           2 months ago
  • 0.245.0                                ...           3 months ago
  • 0.244.0                                ...           3 months ago
  • 0.243.0                                ...           3 months ago
  • 0.242.1                                ...           4 months ago
  • 0.242.0                                ...           4 months ago
  • 0.241.0                                ...           4 months ago
  • 0.240.0                                ...           4 months ago
  • 0.239.1                                ...           4 months ago
  • 0.239.0                                ...           4 months ago
  • 0.238.3                                ...           5 months ago
  • 0.238.2                                ...           5 months ago
  • 0.238.1                                ...           5 months ago
  • 0.238.0                                ...           5 months ago
  • 0.237.2                                ...           5 months ago
  • 0.237.1                                ...           6 months ago
  • 0.237.0                                ...           6 months ago
  • 0.236.0                                ...           6 months ago
  • 0.235.1                                ...           7 months ago
  • 0.234.0                                ...           7 months ago
  • 0.233.0                                ...           7 months ago
  • 0.232.0                                ...           8 months ago
  • 0.231.0                                ...           8 months ago
  • 0.230.0                                ...           8 months ago
  • 0.229.2                                ...           9 months ago
  • 0.229.0                                ...           9 months ago
  • 0.228.0                                ...           9 months ago
  • 0.227.0                                ...           10 months ago
  • 0.226.0                                ...           10 months ago
  • 0.225.1                                ...           a year ago
  • 0.225.0                                ...           a year ago
  • 0.224.0                                ...           a year ago
  • 0.223.3                                ...           a year ago
  • 0.223.2                                ...           a year ago
  • 0.223.0                                ...           a year ago
  • 0.222.0                                ...           a year ago
  • 0.221.0                                ...           a year ago
  • 0.220.1                                ...           a year ago
  • 0.220.0                                ...           a year ago
  • 0.219.5                                ...           a year ago
  • 0.219.4                                ...           a year ago
  • 0.219.3                                ...           a year ago
  • 0.219.2                                ...           a year ago
  • 0.219.0                                ...           a year ago
  • 0.218.1                                ...           a year ago
  • 0.218.0                                ...           a year ago
  • 0.217.2                                ...           a year ago
  • 0.217.1                                ...           a year ago
  • 0.217.0                                ...           a year ago
  • 0.216.1                                ...           a year ago
  • 0.216.0                                ...           a year ago
  • 0.215.1                                ...           a year ago
  • 0.215.0                                ...           a year ago
  • 0.214.0                                ...           a year ago
  • 0.213.1                                ...           a year ago
  • 0.213.0                                ...           a year ago
  • 0.212.0                                ...           a year ago
  • 0.211.1                                ...           a year ago
  • 0.211.0                                ...           a year ago
  • 0.210.2                                ...           a year ago
  • 0.210.1                                ...           a year ago
  • 0.210.0                                ...           a year ago
  • 0.209.1                                ...           a year ago
  • 0.209.0                                ...           a year ago
  • 0.208.1                                ...           a year ago
  • 0.208.0                                ...           a year ago
  • 0.207.0                                ...           a year ago
  • 0.206.0                                ...           2 years ago
  • 0.205.1                                ...           2 years ago
  • 0.205.0                                ...           2 years ago
  • 0.204.1                                ...           2 years ago
  • 0.204.0                                ...           2 years ago
  • 0.203.1                                ...           2 years ago
  • 0.203.0                                ...           2 years ago
  • 0.202.1                                ...           2 years ago
  • 0.202.0                                ...           2 years ago
  • 0.201.0                                ...           2 years ago
  • 0.200.1                                ...           2 years ago
  • 0.200.0                                ...           2 years ago
  • 0.199.1                                ...           2 years ago
  • 0.199.0                                ...           2 years ago
  • 0.198.2                                ...           2 years ago
  • 0.198.1                                ...           2 years ago
  • 0.198.0                                ...           2 years ago
  • 0.197.0                                ...           2 years ago
  • 0.196.3                                ...           2 years ago
  • 0.196.2                                ...           2 years ago
  • 0.196.1                                ...           2 years ago
  • 0.196.0                                ...           2 years ago
  • 0.195.2                                ...           2 years ago
  • 0.195.1                                ...           2 years ago
  • 0.195.0                                ...           2 years ago
  • 0.194.0                                ...           2 years ago
  • 0.193.0                                ...           2 years ago
  • 0.192.0                                ...           2 years ago
  • 0.191.0                                ...           2 years ago
  • 0.190.1                                ...           2 years ago
  • 0.190.0                                ...           2 years ago
  • 0.189.0                                ...           2 years ago
  • 0.188.2                                ...           2 years ago
  • 0.188.1                                ...           2 years ago
  • 0.188.0                                ...           2 years ago
  • 0.187.1                                ...           2 years ago
  • 0.187.0                                ...           2 years ago
  • 0.186.0                                ...           2 years ago
  • 0.185.2                                ...           2 years ago
  • 0.185.1                                ...           2 years ago
  • 0.185.0                                ...           2 years ago
  • 0.184.0                                ...           2 years ago
  • 0.183.1                                ...           2 years ago
  • 0.183.0                                ...           2 years ago
  • 0.182.0                                ...           2 years ago
  • 0.181.2                                ...           2 years ago
  • 0.181.1                                ...           2 years ago
  • 0.181.0                                ...           2 years ago
  • 0.180.1                                ...           2 years ago
  • 0.180.0                                ...           2 years ago
  • 0.179.0                                ...           2 years ago
  • 0.178.1                                ...           2 years ago
  • 0.178.0                                ...           3 years ago
  • 0.177.0                                ...           3 years ago
  • 0.176.3                                ...           3 years ago
  • 0.176.2                                ...           3 years ago
  • 0.176.1                                ...           3 years ago
  • 0.176.0                                ...           3 years ago
  • 0.175.1                                ...           3 years ago
  • 0.175.0                                ...           3 years ago
  • 0.174.1                                ...           3 years ago
  • 0.174.0                                ...           3 years ago
  • 0.173.0                                ...           3 years ago
  • 0.172.0                                ...           3 years ago
  • 0.171.0                                ...           3 years ago
  • 0.170.0                                ...           3 years ago
  • 0.169.0                                ...           3 years ago
  • 0.168.0                                ...           3 years ago
  • 0.167.1                                ...           3 years ago
  • 0.167.0                                ...           3 years ago
  • 0.166.1                                ...           3 years ago
  • 0.166.0                                ...           3 years ago
  • 0.165.1                                ...           3 years ago
  • 0.165.0                                ...           3 years ago
  • 0.164.0                                ...           3 years ago
  • 0.163.0                                ...           3 years ago
  • 0.162.1                                ...           3 years ago
  • 0.162.0                                ...           3 years ago
  • 0.161.0                                ...           3 years ago
  • 0.160.2                                ...           3 years ago
  • 0.160.1                                ...           3 years ago
  • 0.160.0                                ...           3 years ago
  • 0.159.0                                ...           3 years ago
  • 0.158.0                                ...           3 years ago
  • 0.157.0                                ...           3 years ago
  • 0.156.0                                ...           3 years ago
  • 0.155.1                                ...           3 years ago
  • 0.155.0                                ...           3 years ago
  • 0.154.0                                ...           3 years ago
  • 0.153.0                                ...           3 years ago
  • 0.152.0                                ...           3 years ago
  • 0.151.0                                ...           4 years ago
  • 0.150.1                                ...           4 years ago
  • 0.150.0                                ...           4 years ago
  • 0.149.0                                ...           4 years ago
  • 0.148.0                                ...           4 years ago
  • 0.147.0                                ...           4 years ago
  • 0.146.0                                ...           4 years ago
  • 0.145.0                                ...           4 years ago
  • 0.144.0                                ...           4 years ago
  • 0.143.1                                ...           4 years ago
  • 0.143.0                                ...           4 years ago
  • 0.142.0                                ...           4 years ago
  • 0.141.0                                ...           4 years ago
  • 0.140.0                                ...           4 years ago
  • 0.139.0                                ...           4 years ago
  • 0.138.0                                ...           4 years ago
  • 0.137.0                                ...           4 years ago
  • 0.136.0                                ...           4 years ago
  • 0.135.0                                ...           4 years ago
  • 0.134.0                                ...           4 years ago
  • 0.133.0                                ...           4 years ago
  • 0.132.0                                ...           4 years ago
  • 0.131.0                                ...           4 years ago
  • 0.130.0                                ...           4 years ago
  • 0.129.0                                ...           4 years ago
  • 0.128.0                                ...           4 years ago
  • 0.127.0                                ...           4 years ago
  • 0.126.1                                ...           4 years ago
  • 0.126.0                                ...           4 years ago
  • 0.125.1                                ...           4 years ago
  • 0.125.0                                ...           5 years ago
  • 0.124.0                                ...           5 years ago
  • 0.123.0                                ...           5 years ago
  • 0.122.0                                ...           5 years ago
  • 0.121.0                                ...           5 years ago
  • 0.120.1                                ...           5 years ago
  • 0.119.1                                ...           5 years ago
  • 0.119.0                                ...           5 years ago
  • 0.118.0                                ...           5 years ago
  • 0.117.1                                ...           5 years ago
  • 0.117.0                                ...           5 years ago
  • 0.116.1                                ...           5 years ago
  • 0.116.0                                ...           5 years ago
  • 0.115.0                                ...           5 years ago
  • 0.114.0                                ...           5 years ago
  • 0.113.0                                ...           5 years ago
  • 0.112.0                                ...           5 years ago
  • 0.111.3                                ...           5 years ago
  • 0.111.1                                ...           5 years ago
  • 0.111.0                                ...           5 years ago
  • 0.110.1                                ...           5 years ago
  • 0.110.0                                ...           5 years ago
  • 0.109.0                                ...           5 years ago
  • 0.108.0                                ...           5 years ago
  • 0.107.0                                ...           5 years ago
  • 0.106.3                                ...           5 years ago
  • 0.106.2                                ...           5 years ago
  • 0.106.1                                ...           5 years ago
  • 0.106.0                                ...           5 years ago
  • 0.105.2                                ...           5 years ago
  • 0.105.0                                ...           5 years ago
  • 0.104.0                                ...           5 years ago
  • 0.103.0                                ...           5 years ago
  • 0.102.0                                ...           5 years ago
  • 0.101.1                                ...           5 years ago
  • 0.101.0                                ...           5 years ago
  • 0.100.0                                ...           5 years ago
  • 0.99.1                                ...           5 years ago
  • 0.99.0                                ...           5 years ago
  • 0.98.1                                ...           6 years ago
  • 0.98.0                                ...           6 years ago
  • 0.97.0                                ...           6 years ago
  • 0.96.1                                ...           6 years ago
  • 0.95.2                                ...           6 years ago
  • 0.95.1                                ...           6 years ago
  • 0.95.0                                ...           6 years ago
  • 0.94.0                                ...           6 years ago
  • 0.93.0                                ...           6 years ago
  • 0.92.1                                ...           6 years ago
  • 0.92.0                                ...           6 years ago
  • 0.91.0                                ...           6 years ago
  • 0.90.0                                ...           6 years ago
  • 0.89.0                                ...           6 years ago
  • 0.88.0                                ...           6 years ago
  • 0.87.0                                ...           6 years ago
  • 0.86.0                                ...           6 years ago
  • 0.85.0                                ...           6 years ago
  • 0.84.0                                ...           6 years ago
  • 0.83.0                                ...           6 years ago
  • 0.82.0                                ...           6 years ago
  • 0.81.0                                ...           6 years ago
  • 0.80.0                                ...           6 years ago
  • 0.79.1                                ...           6 years ago
  • 0.79.0                                ...           6 years ago
  • 0.78.0                                ...           6 years ago
  • 0.76.0                                ...           6 years ago
  • 0.75.0                                ...           6 years ago
  • 0.74.0                                ...           6 years ago
  • 0.73.0                                ...           6 years ago
  • 0.72.0                                ...           7 years ago
  • 0.71.0                                ...           7 years ago
  • 0.70.0                                ...           7 years ago
  • 0.69.0                                ...           7 years ago
  • 0.68.0                                ...           7 years ago
  • 0.67.1                                ...           7 years ago
  • 0.67.0                                ...           7 years ago
  • 0.66.0                                ...           7 years ago
  • 0.65.0                                ...           7 years ago
  • 0.64.0                                ...           7 years ago
  • 0.63.1                                ...           7 years ago
  • 0.63.0                                ...           7 years ago
  • 0.62.0                                ...           7 years ago
  • 0.61.0                                ...           7 years ago
  • 0.60.1                                ...           7 years ago
  • 0.60.0                                ...           7 years ago
  • 0.59.0                                ...           7 years ago
  • 0.58.0                                ...           7 years ago
  • 0.57.3                                ...           7 years ago
  • 0.57.2                                ...           7 years ago
  • 0.57.1                                ...           7 years ago
  • 0.57.0                                ...           7 years ago
  • 0.56.0                                ...           7 years ago
  • 0.55.0                                ...           7 years ago
  • 0.54.1                                ...           7 years ago
  • 0.54.0                                ...           7 years ago
  • 0.53.1                                ...           7 years ago
  • 0.53.0                                ...           7 years ago
  • 0.52.0                                ...           7 years ago
  • 0.51.1                                ...           7 years ago
  • 0.51.0                                ...           7 years ago
  • 0.50.0                                ...           7 years ago
  • 0.49.1                                ...           7 years ago
  • 0.49.0                                ...           7 years ago
  • 0.47.0                                ...           7 years ago
  • 0.46.0                                ...           8 years ago
  • 0.45.0                                ...           8 years ago
  • 0.44.0                                ...           8 years ago
  • 0.43.0                                ...           8 years ago
  • 0.42.0                                ...           8 years ago
  • 0.40.0                                ...           8 years ago
  • 0.38.0                                ...           8 years ago
  • 0.37.0                                ...           8 years ago
  • 0.36.0                                ...           8 years ago
  • 0.35.0                                ...           8 years ago
  • 0.34.0                                ...           8 years ago
  • 0.33.0                                ...           8 years ago
  • 0.32.0                                ...           8 years ago
  • 0.28.0                                ...           8 years ago
  • 0.26.0                                ...           8 years ago
  • 0.25.0                                ...           8 years ago
  • 0.23.1                                ...           9 years ago
  • 0.21.0                                ...           9 years ago
  • 0.7.0                                ...           9 years ago
  • 0.6.0                                ...           9 years ago
  • 0.5.0                                ...           10 years ago
  • 0.4.0                                ...           10 years ago
  • 0.3.0                                ...           10 years ago
  • 0.2.2                                ...           10 years ago
  • 0.2.1                                ...           10 years ago
  • 0.2.0                                ...           10 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.0                                ...           10 years ago
Downloads
Total 2
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (4)

© 2010 - cnpmjs.org x YWFE | Home | YWFE