Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ttys026/reserved-tokens
- Owner: ttys026
- Created: 2020-08-05T02:04:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T06:17:36.000Z (over 3 years ago)
- Last Synced: 2025-01-20T13:08:45.986Z (13 days 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)