npm.devtool.tech
👏 You can access js-tokens package with using jsTokens variable in browser devtools!
Tiny JavaScript tokenizer.

code/package/bundle size

0B
publish
0B
install
0B
bundle minified
0B
bundle gzipped

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

🔎Explore Package🔎CDN Script