2.2.0 • Published 1 year ago

@putout/operator-keyword v2.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago