You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

cherow

Package Overview
Dependencies
Maintainers
1
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cherow

**WORK IN PROGRESS**


Version published
Weekly downloads
21K
decreased by-2.36%
Maintainers
1
Install size
467 kB
Created
Weekly downloads
 

Readme

Source

Cherow

WORK IN PROGRESS

Cherow is a very fast and unbeatable, standard-compliant ECMAScript parser written in ECMAScript.

Note! The source exist in the "dev" branch

Features

  • Full support for ECMAScript 2017 (ECMA-262 8th Edition)
  • 100 % TC262 Compatible
  • JSX
  • TypeScript (in progress)
  • Optional tracking of syntax node location (index-based and line-column)
  • 6300 unit tests with full code coverage

ESNext features

Stage 3 features support. This need to be enabled with the next option

  • Dynamic Import
  • Async generators
  • Async Await
  • Object spread
  • BigInt
  • Optional catch binding
  • Regular Expression's new DotAll flag

Options

  • next - Enables ECMAScript Next support and let you use proposals at stage 3 or higher such as Dynamic Import.
  • directives - Enables support for directive nodes
  • raw - Enables the raw property on literal nodes (Esprima and Acorn feature)
  • onComment - Enables option to collect comments. Optional; Either array or function.
  • tokenize - If enabled each found token will be returned as either an function or an array (work in progres)
  • ranges - Enables the start and characters offsets on the AST node.
  • locations - Enables location tracking. (4 min fix, but on hold for now)
  • jsx - Enables JSX
  • ts - Enables TypeScript (coming very soon)

Current state

Cherow can be used. At this stage it should be more or less equal to Esprima and Acorn, but much much faster!

Nothing much will be done on active work the next period because I'm now going to finalize and cleanup the code base locale.

Benchmarks

To be written

Contribution

You are welcome to contribute. As a golden rule - always run benchmarks to verify that you haven't created any bottlenecks or did something that you shouldn't.

Terms of contribution:

  • Think twice before you try to implement anything
  • Minimum 1.5 mill ops / sec for light weight cases, and 800k - 1 mill ops / sec for "heavy" cases
  • Avoid duplicating the source code
  • Create tests that cover what you have implemented

FAQs

Package last updated on 15 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc