cjs-module-lexer

v1.4.1
Lexes CommonJS modules, returning their named exports metadata

test-js

mocha -b -u tdd test/*.js

test-wasm

cross-env WASM=1 mocha -b -u tdd test/*.js

test-wasm-sync

cross-env WASM_SYNC=1 mocha -b -u tdd test/*.js

test

npm run test-wasm ; npm run test-wasm-sync ; npm run test-js

bench

node --expose-gc bench/index.mjs

build

node build.js ; babel dist/lexer.mjs -o dist/lexer.js ; terser dist/lexer.js -o dist/lexer.js

build-wasm

make lib/lexer.wasm ; node build.js

prepublishOnly

make && npm run build

footprint

npm run build && cat dist/lexer.js | gzip -9f | wc -c
npm i cjs-module-lexer

Metadata

  • MIT
  • Whatever
  • Guy Bedford
  • released 9/7/2024

Downloads