https://github.com/ttys026/reserved-tokens
reserved-tokens in javascript
https://github.com/ttys026/reserved-tokens
Last synced: about 1 year ago
JSON representation
reserved-tokens in javascript
- Host: GitHub
- URL: https://github.com/ttys026/reserved-tokens
- Owner: ttys026
- Created: 2020-08-05T02:04:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T06:17:36.000Z (almost 5 years ago)
- Last Synced: 2025-03-15T04:49:07.125Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)