0.1.2 • Published 8 years ago

reserved-words v0.1.2

Weekly downloads
744,808
License
MIT
Repository
github
Last release
8 years ago

reserved-words

Build Status

What is it?

Tiny package for detecting reserved words.

Reserved Word is either a Keyword, or a Future Reserved Word, or a Null Literal, or a Boolean Literal. See: ES5 #7.6.1 and ES6 #11.6.2.

Installation

npm install reserved-words

API

check(word, dialect, strict)

Returns true if provided identifier string is a Reserved Word in some ECMAScript dialect (ECMA-262 edition).

If the strict flag is truthy, this function additionally checks whether word is a Keyword or Future Reserved Word under strict mode.

Example

var reserved = require('reserved-words');
reserved.check('volatile', 'es3'); // true
reserved.check('volatile', 'es2015'); // false
reserved.check('yield', 3); // false
reserved.check('yield', 6); // true

dialects

es3 (or 3)

Represents ECMA-262 3rd edition.

See section 7.5.1.

es5 (or 5)

Represents ECMA-262 5th edition (ECMAScript 5.1).

Reserved Words are formally defined in ECMA262 sections 7.6.1.1 and 7.6.1.2.

es2015 (or es6, 6)

Represents ECMA-262 6th edition(ECMAScript 2015).

Reserved Words are formally defined in sections 11.6.2.1 and 11.6.2.2.

License

Licensed under The MIT License

@umijs-ng/openapityped-image-modulescloud-archive-s3@pandell/typescript-plugin-css-modulesjavonet.nodejs.sdkjavonet.nodejs.sdk.test@everything-registry/sub-chunk-2656@ywwmm/openapisz-swagger-apiwnikoopenapi2typescriptwodax-rollup-plugin-postcss-umixm-openapivite-openapivite-plugin-vben-openapivenus-scripts@bung87/rollup-plugin-postcss@benjamin-vanryseghem/rollup-plugin-postcss@powerfulyang/umi-openapijscsjavonet-nodejs-sdkkeliu-openapi-geniiif-manifest-editorimi-openapi-toolshtmlhint-riot-ruleshlsa-swagger-to-interfacehandlebars-to-jsxlinkmore-openapilivepackluna-openapilcr-create-api@webbio/rollup-plugin-postcss-webbio@welove9am/typescript-plugin-css-modules@wessberg/cjs-to-esm-transformer@winner-fed/openapi@xbdtb/api-gen@umijs/openapi@thunder_ai/openapi@ui5/tooling-webc@tools-jx/openapi@vegnegun/sequelize-auto@yourenz/umijs-openapi@zakijs/utils@yunfeidog/openapi2typescript@ywwlmm/openapi@yxgr/openapi@zhijianren/rollup-plugin-postcss@teqed/sequelize-autoangular-template-expressions-extractorawesome-typed-css-modulesappxgen@guanghechen/postcss-modules-dts@aiot-toolkit/parser@airporting/sequelize-auto@alza54/typescript-plugin-css-modules@alioth_91/openapityped-lesstyped-less-modulestyped-less-modules-renewedtyped-less-modules-tstyped-scss-modulestyped-scss-modules-camel-onlyumi-plugin-openapi-urlumijs-plugin-openapitypescript-plugin-css-module-typestypescript-plugin-css-modulestpcm@astro-my/generator-astro-nodejs@barusu-react/rollup-plugin-postcss-dts@bitbean/sequelize-classgen@blackbaud/skyux-builder-plugin-stache@blackbaud/skyux-builder-plugin-stache-json-data@blendle/rollup-plugin-postcss@bsb-mbp/fecs@cdktf/hcl2cdkyunfeidog-openapi2typescript@liuyang0826/openapi-parser@lauginwing/openapi-gen@lauginwing/openapi-generator@lemon-clown-wpg/rollup-plugin-postcss-dts@necode-org/mike@nextbook/sequelize-auto@plrthink/rollup-plugin-postcss@sak1sham/react-toc-highlight@ryan-liu/swagger-build@salomvary/handlebars-to-jsx@salty6952/openapi@ph.fritsche/cjstoesm@sendanor/cloud-backend@sendanor/cloud-clientmos-plugin-ejsmos-plugin-markdownscriptopenapi_ghopenapi2tsopenapi2typescript-tempopenapi2typescript-yamlopenapi3-generator-tsopenapi3-ts-generatoropenapi-requestopenapi-schema-codeopenapi-ts-request
0.1.2

8 years ago

0.1.1

10 years ago

0.1.0

10 years ago