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@dlkit/openapi@bung87/rollup-plugin-postcss@benjamin-vanryseghem/rollup-plugin-postcss@powerfulyang/umi-openapijscsjavonet-nodejs-sdkkeliu-openapi-gentyped-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@alza54/typescript-plugin-css-modules@astro-my/generator-astro-nodejs@airporting/sequelize-auto@alioth_91/openapi@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/hcl2cdk@delicloud/openapiyunfeidog-openapi2typescript@guanghechen/postcss-modules-dts@huhm/openapi-gen@homegrown/rollup-plugin-postcss-modules@findmio/openapi@g3rrydanc3/sequelize-auto@liuyang0826/openapi-parser@lauginwing/openapi-gen@lauginwing/openapi-generator@lemon-clown-wpg/rollup-plugin-postcss-dts@lukeed/rollup-plugin-postcss@magicdawn/typed-less-modules@mail4entry/sequelize-auto-fork@meck/rollup-plugin-postcss@necode-org/mike@nextbook/sequelize-auto@mo36924/dev-server@mo36924/app@moebius/rollup-plugin-postcss@isplasher/typed-less-modules@jinglun/openapi@jlkiri/rollup-plugin-postcss@jabuco/typed-scss-modules@hilan/vite-plugin-vben-openapi@norjs/backend@qiniu/typed-less-modules@plrthink/rollup-plugin-postcss@sak1sham/react-toc-highlight@ryan-liu/swagger-build@salomvary/handlebars-to-jsx@radist2s/typed-image-modules@salty6952/openapi@revenuegrid/style2dts@ph.fritsche/cjstoesm@obvcloud/openapi-sdk@ornikar/rollup-plugin-postcss@osdev/rollup-plugin-postcss@sofunny/openapi@remax/rollup-plugin-postcss@sendanor/cloud-backend@sendanor/cloud-clientmos-plugin-ejsmos-plugin-markdownscriptopenapi_ghopenapi2tsopenapi2typescript-tempopenapi2typescript-yamlopenapi3-generator-tsopenapi3-ts-generatoropenapi-requestopenapi-schema-codeopenapi-ts-requestopenapi-ts-request-dotnetopenapi-lnopenapi-genuu
0.1.2

8 years ago

0.1.1

10 years ago

0.1.0

10 years ago