remove-use-strict
Advanced tools
Weekly downloads
Changelog
1.0.0
Readme
This node module remove unnecessary "use strict";
literal.
"use strict";
?A Use Strict Directive is an ExpressionStatement in a Directive Prologue whose StringLiteral is either the exact character sequences "use strict" or 'use strict'. A Use Strict Directive may not contain an EscapeSequence or LineContinuation.
A Directive Prologue is the longest sequence of ExpressionStatement productions occurring as the initial SourceElement productions of a Program or FunctionBody and where each ExpressionStatement in the sequence consists entirely of a StringLiteral token followed a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion. A Directive Prologue may be an empty sequence.
via ECMAScript Language Specification - ECMA-262 Edition 5.1
and "use strict" - blog.niw.at
This module remove "use strict";
which isn't delective prologue.
(also has force
option)
npm install remove-use-strict
var removeUst = require("../lib/remove-use-strict");
var code = 'var a = 1;\n' +
'"use strict";\n"use strict";';// unnecessary use strict...
removeUst(code); // => 'var a = 1;'
force option : true
var code = '"use strict";\n' +
'function a(){ "use strict"; \n var a = "use strict"; }';
removeUst(code, {
force : true
}) // => 'function a(){ var a = "use strict"; }'
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
FAQs
remove unnecessary 'use strict';
The npm package remove-use-strict receives a total of 815 weekly downloads. As such, remove-use-strict popularity was classified as not popular.
We found that remove-use-strict demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.