开发者社区> 镜像站> NPM> is-valid-identifier
is-valid-identifier
check if a string is a valid ECMAscript identifier
Last updated 2 years ago by yerkopalma .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install is-valid-identifier 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 2.0.2                                ...           latest (2 years ago)

3 Versions

  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 11
This Month 10
Last Day 1
Last Week 9
Last Month 47
Dependencies (1)
Dev Dependencies (3)