JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8356
  • Score
    100M100P100Q146445F
  • License MIT

🐊Putout operator adds ability to check if whether Identifier is a keyword or not

Package Exports

  • @putout/operator-keyword
  • @putout/operator-keyword/lib/keyword.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@putout/operator-keyword) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@putout/operator-keyword NPM version

🐊Putout operator adds ability to check whether Identifier is a keyword or not.

Install

npm i putout @putout/operator-keyword

API

import {operator} from 'putout';

const {
    isKeyword,
    isTSKeyword,
    isDeclarationKeyword,
    isModuleDeclarationKeyword,
    isConditionKeyword,
} = operator;

isKeyword('if');
// returns
true;

isKeyword('abc');
// returns
false;

isDeclarationKeyword('const');
// returns
true;

isModuleDeclarationKeyword('import');
// returns
true;

isConditionKeyword('if');
// returns
true;

isStatementKeyword('for');
// returns
true;

isTSKeyword('implements');
// returns
true;

License

MIT