is-valid-identifier
v2.0.2
Published
check if a string is a valid ECMAscript identifier
Downloads
102,282
Readme
is-valid-identifier
check if a string is a valid ECMAscript identifier
All the code is based on this repo, I am just putting it into npm.
Installation
npm install --save is-valid-identifier
Usage
const isValidIdentifier = require('is-valid-identifier')
isValidIdentifier('404') // => false
isValidIdentifier('404', true) // => second argument is for strict mode, instead of returning a false, will throw an exception
License
MIT
Crafted with <3 by Yerko Palma.
This package was initially generated with yeoman and the p generator.