verstak-sdk/node_modules/strip-literal
mirivlad 2f1b822e20 feat: add scripts/build.sh, test.sh, check.sh 2026-06-16 12:11:59 +08:00
..
dist feat: add scripts/build.sh, test.sh, check.sh 2026-06-16 12:11:59 +08:00
LICENSE feat: add scripts/build.sh, test.sh, check.sh 2026-06-16 12:11:59 +08:00
README.md feat: add scripts/build.sh, test.sh, check.sh 2026-06-16 12:11:59 +08:00
package.json feat: add scripts/build.sh, test.sh, check.sh 2026-06-16 12:11:59 +08:00

README.md

strip-literal

NPM version

Strip comments and string literals from JavaScript code. Powered by js-tokens.

Usage

import { stripLiteral } from 'strip-literal'

stripLiteral('const foo = `//foo ${bar}`') // 'const foo = `       ${bar}`'

Comments, string literals will be replaced by spaces with the same length to keep the source map untouched.

Sponsors

License

MIT License © 2022 Anthony Fu