Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ttys026/reserved-tokens

reserved-tokens in javascript
https://github.com/ttys026/reserved-tokens

Last synced: 8 days ago
JSON representation

reserved-tokens in javascript

Awesome Lists containing this project

README

        

### reserved-tokens

#### Installation

```
npm install reserved-tokens
```

#### API

```javascript
import { isReserved, getValidVarName } from 'reserved-tokens';
const valid = !isReserved(word);
const validName = getValidVarName(word);
```

This lib uses the latest word map from [v8 scanner](https://github.com/v8/v8/blob/master/src/parsing/scanner-inl.h#L18)