2.2.0 • Published 10 months ago

@putout/operator-keyword v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@putout/operator-keyword NPM version

🐊Putout operator adds ability to lint keyword.

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

2.2.0

10 months ago

2.1.0

10 months ago

2.0.0

11 months ago

1.8.0

11 months ago

1.7.0

11 months ago

1.6.0

11 months ago

1.5.1

11 months ago

1.5.0

11 months ago

1.4.0

11 months ago

1.3.0

11 months ago

1.2.0

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago