learning_ai_notes/backend/node_modules/js-tokens
2026-03-10 08:53:07 -07:00
..
index.d.ts feat(notes): scaffold product surfaces and backend MCP slices 2026-03-10 08:53:07 -07:00
index.js feat(notes): scaffold product surfaces and backend MCP slices 2026-03-10 08:53:07 -07:00
LICENSE feat(notes): scaffold product surfaces and backend MCP slices 2026-03-10 08:53:07 -07:00
package.json feat(notes): scaffold product surfaces and backend MCP slices 2026-03-10 08:53:07 -07:00
README.md feat(notes): scaffold product surfaces and backend MCP slices 2026-03-10 08:53:07 -07:00

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