npm install reserved-tokens
import { isReserved, getValidVarName } from 'reserved-tokens';
const valid = !isReserved(word);
const validName = getValidVarName(word);
This lib uses the latest word map from v8 scanner
npm install reserved-tokens
import { isReserved, getValidVarName } from 'reserved-tokens';
const valid = !isReserved(word);
const validName = getValidVarName(word);
This lib uses the latest word map from v8 scanner