is-valid-identifier

2.0.2 • Public • Published

is-valid-identifier Build Status js-standard-style

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.2
    23,080
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.2
    23,080
  • 2.0.1
    0
  • 2.0.0
    0

Package Sidebar

Install

npm i is-valid-identifier

Weekly Downloads

20,610

Version

2.0.2

License

MIT

Unpacked Size

42.8 kB

Total Files

5

Last publish

Collaborators

  • yerkopalma