![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | dist/ | 8 months ago | - | |
![]() | node_modules/ | 8 months ago | - | |
![]() | LICENSE | 8 months ago | 1.1K | |
![]() | README.md | 8 months ago | 837 | |
![]() | package.json | 8 months ago | 1.5K |
Strip comments and string literals from JavaScript code. Powered by js-tokens
.
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.
MIT License © 2022 Anthony Fu