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-scriptsjscsjavonet-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@powerfulyang/umi-openapigenerator-vuetify-rest-apigenerator-tendencias-testv3generator-restgenerator-rest-danmmxgenerator-nuxt-exgenerator-nourafork-qiniu-typed-less-modulesgenerator-dsmgenerator-newrestgenerator-apirestgenerator-astrogenerator-astro-nodejsgen-react-tpldva-generatorecho-fecsdomean-openapienacom-rest-genexabfecs@bitbean/sequelize-classgen@blackbaud/skyux-builder-plugin-stache@blackbaud/skyux-builder-plugin-stache-json-data@blendle/rollup-plugin-postcss@bung87/rollup-plugin-postcss@bsb-mbp/fecs@chauhan-rakesh/cardjs@chauhan-rakesh/chauhan-rakesh@chess99/typed-less-modules@cdktf/hcl2cdk@ccs-ui/open-api@ccs-ui/plugin-openapi@benjamin-vanryseghem/rollup-plugin-postcss@baolq/api2ts@barusu-react/rollup-plugin-postcss-dts@braydenyang/openapi2tschenapicjstoesmcloud-backenddetect-reserved-keywords@aplus-frontend/api-generate-cli@aiot-toolkit/parser@alza54/typescript-plugin-css-modules@airporting/sequelize-auto@alioth_91/openapityped-lesstyped-less-modulestyped-less-modules-renewedtyped-less-modules-tstyped-scss-modulestyped-scss-modules-camel-onlyumi-plugin-openapi-urlumijs-plugin-openapi
0.1.2

8 years ago

0.1.1

10 years ago

0.1.0

10 years ago