0.1.2 • Published 7 years ago

reserved-words v0.1.2

Weekly downloads
744,808
License
MIT
Repository
github
Last release
7 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@barusu-react/rollup-plugin-postcss-dts@lemon-clown-wpg/rollup-plugin-postcss-dts@liuyang0826/openapi-parser@moebius/rollup-plugin-postcss@obvcloud/openapi-sdkgoog2esm@meck/rollup-plugin-postcss@lukeed/rollup-plugin-postcss@magicdawn/typed-less-modules@mail4entry/sequelize-auto-forkgenerator-apirestgenerator-dsm@mo36924/app@mo36924/dev-servergenerator-astrogenerator-astro-nodejsgen-react-tplgenerator-newrestgenerator-nouragenerator-nuxt-ex@necode-org/mikegenerator-restgenerator-rest-danmmx@nextbook/sequelize-autogenerator-vuetify-rest-apigenerator-tendencias-testv3@norjs/backendgk-fecs@lauginwing/openapi-gen@lauginwing/openapi-generator@revenuegrid/style2dts@remax/rollup-plugin-postcss@sak1sham/react-toc-highlight@osdev/rollup-plugin-postcss@ryan-liu/swagger-buildhtmlhint-riot-rules@radist2s/typed-image-moduleshandlebars-to-jsx@ornikar/rollup-plugin-postcss@qiniu/typed-less-modules@ph.fritsche/cjstoesm@slater/rollup-plugin-postcss@sendanor/cloud-backend@sendanor/cloud-clientjavonet-nodejs-sdk@shoppedance/openapi@sharebravery/openapi@salomvary/handlebars-to-jsx@plrthink/rollup-plugin-postcss@sixhour/swagger2server@salty6952/openapihlsa-swagger-to-interface@powerfulyang/umi-openapikeliu-openapi-gen@teqed/sequelize-auto@benjamin-vanryseghem/rollup-plugin-postcss@astro-my/generator-astro-nodejs@bsb-mbp/fecs@bung87/rollup-plugin-postcss@bitbean/sequelize-classgen@blackbaud/skyux-builder-plugin-stache@blackbaud/skyux-builder-plugin-stache-json-data@blendle/rollup-plugin-postcssawesome-typed-css-modulesappxgen@sofunny/openapijscs@zakijs/utils@yxgr/openapilivepackluna-openapichenapimos-plugin-ejsmos-plugin-markdownscript@welove9am/typescript-plugin-css-modules@clarigen/cli@umijs/openapi@ui5/tooling-webclcr-create-api@webbio/rollup-plugin-postcss-webbio@wessberg/cjs-to-esm-transformer@zhijianren/rollup-plugin-postcsslinkmore-openapi@xbdtb/api-gen@vegnegun/sequelize-autoangular-template-expressions-extractor@airporting/sequelize-auto@alioth_91/openapi@yourenz/umijs-openapi@alza54/typescript-plugin-css-modulescjstoesmopenapi-schema-codeopenapi-ln
0.1.2

7 years ago

0.1.1

9 years ago

0.1.0

9 years ago