We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const obj = { // Here are some code comments name: `js`, /** * Here are some code comments */ v: `es6`, }
const outStr = strip(str, { preserveNewlines: false, });
const obj = { name: `js`, v: `es6`, }
Note: v There is a blank character before the key, but it is not in the source code. Is this a bug?
The text was updated successfully, but these errors were encountered:
I know this is really old, but in case anyone else comes across it. I couldn't get the preserveNewlines: false to work so added this:
preserveNewlines: false
const cleanScript = strip(script).replace(/[\r\n]+/gm, '\n');
More on the regex here: https://www.geeksforgeeks.org/how-to-remove-all-line-breaks-from-a-string-using-javascript/
Sorry, something went wrong.
Try this tool: remove-comments
glob
No branches or pull requests
Remove all whitespace related to comments
Source code:
Conversion options:
Actual output:
Note: v There is a blank character before the key, but it is not in the source code. Is this a bug?
Expected output:
The text was updated successfully, but these errors were encountered: