js-tokens
Tiny JavaScript tokenizer.
Last updated 2 months ago by lydell .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install js-tokens 
SYNC missed versions from official npm registry.

js-tokens

The tiny, regex powered, lenient, almost spec-compliant JavaScript tokenizer that never fails.

const jsTokens = require("js-tokens");

const jsString = 'JSON.stringify({k:3.14**2}, null /*replacer*/, "\\t")';

Array.from(jsTokens(jsString), (token) => token.value).join("|");
// JSON|.|stringify|(|{|k|:|3.14|**|2|}|,| |null| |/*replacer*/|,| |"\t"|)

➡️ Full readme

Current Tags

  • 6.0.0                                ...           latest (2 months ago)

17 Versions

  • 6.0.0                                ...           2 months ago
  • 5.0.0                                ...           a year ago
  • 4.0.0                                ...           2 years ago
  • 3.0.2                                ...           3 years ago
  • 3.0.1                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 38,200
This Week 202,263
This Month 202,263
Last Day 54,721
Last Week 306,848
Last Month 1,207,392
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (140)

Copyright 2014 - 2016 © taobao.org |