# is-valid-identifier

> check if a string is a valid ECMAscript identifier

Latest version **2.0.2** (published 2019-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-valid-identifier
pnpm add is-valid-identifier
yarn add is-valid-identifier
bun add is-valid-identifier
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-05-19 |
| First published | 2016-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 41.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Yerko |
| Maintainers | yerkopalma |

## Links

- npm: https://www.npmjs.com/package/is-valid-identifier
- Repository: https://github.com/YerkoPalma/is-valid-identifier
- Homepage: https://github.com/YerkoPalma/is-valid-identifier#readme
- Issues: https://github.com/YerkoPalma/is-valid-identifier/issues
- npm.io page: https://npm.io/package/is-valid-identifier

## Dependencies (1)

- [assert](https://npm.io/package/assert.md) ^1.4.1

## Recent versions

- 2.0.2 (latest) — 2019-05-19
- 2.0.1 — 2019-05-09
- 2.0.0 — 2016-09-29

## README

# is-valid-identifier [![Build Status](https://secure.travis-ci.org/YerkoPalma/is-valid-identifier.svg?branch=master)](https://travis-ci.org/YerkoPalma/is-valid-identifier) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

> check if a string is a valid ECMAscript identifier

All the code is based on [this repo](https://github.com/mathiasbynens/mothereff.in/tree/master/js-variables), I am just putting it into npm.

## Installation

```bash
npm install --save is-valid-identifier
```

## Usage

```javascript
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](https://github.com/YerkoPalma).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

---
_Source: https://npm.io/package/is-valid-identifier · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
