diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/is-word-character')
4 files changed, 195 insertions, 0 deletions
diff --git a/tools/node_modules/eslint/node_modules/is-word-character/LICENSE b/tools/node_modules/eslint/node_modules/is-word-character/LICENSE new file mode 100644 index 0000000000..8d8660d36e --- /dev/null +++ b/tools/node_modules/eslint/node_modules/is-word-character/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2016 Titus Wormer <tituswormer@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tools/node_modules/eslint/node_modules/is-word-character/index.js b/tools/node_modules/eslint/node_modules/is-word-character/index.js new file mode 100644 index 0000000000..9641147437 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/is-word-character/index.js @@ -0,0 +1,14 @@ +'use strict'; + +module.exports = wordCharacter; + +var fromCode = String.fromCharCode; +var re = /\w/; + +/* Check if the given character code, or the character + * code at the first character, is a word character. */ +function wordCharacter(character) { + return re.test( + typeof character === 'number' ? fromCode(character) : character.charAt(0) + ); +} diff --git a/tools/node_modules/eslint/node_modules/is-word-character/package.json b/tools/node_modules/eslint/node_modules/is-word-character/package.json new file mode 100644 index 0000000000..f61477be62 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/is-word-character/package.json @@ -0,0 +1,99 @@ +{ + "_from": "is-word-character@^1.0.0", + "_id": "is-word-character@1.0.1", + "_inBundle": false, + "_integrity": "sha1-WgP6HqkazopusMfNdw64bWXIvvs=", + "_location": "/is-word-character", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "is-word-character@^1.0.0", + "name": "is-word-character", + "escapedName": "is-word-character", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/remark-parse" + ], + "_resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.1.tgz", + "_shasum": "5a03fa1ea91ace8a6eb0c7cd770eb86d65c8befb", + "_spec": "is-word-character@^1.0.0", + "_where": "/Users/cjihrig/iojs/node/tools/eslint-tmp/node_modules/eslint/node_modules/remark-parse", + "author": { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + }, + "bugs": { + "url": "https://github.com/wooorm/is-word-character/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Titus Wormer", + "email": "tituswormer@gmail.com", + "url": "http://wooorm.com" + } + ], + "dependencies": {}, + "deprecated": false, + "description": "Check if a character is a word character", + "devDependencies": { + "browserify": "^14.1.0", + "esmangle": "^1.0.1", + "nyc": "^11.0.0", + "remark-cli": "^3.0.0", + "remark-preset-wooorm": "^3.0.0", + "tape": "^4.0.0", + "xo": "^0.18.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/wooorm/is-word-character#readme", + "keywords": [ + "string", + "character", + "char", + "code", + "word" + ], + "license": "MIT", + "name": "is-word-character", + "nyc": { + "check-coverage": true, + "lines": 100, + "functions": 100, + "branches": 100 + }, + "remarkConfig": { + "plugins": [ + "preset-wooorm" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/wooorm/is-word-character.git" + }, + "scripts": { + "build": "npm run build-md && npm run build-bundle && npm run build-mangle", + "build-bundle": "browserify index.js --bare -s isWordCharacter > is-word-character.js", + "build-mangle": "esmangle < is-word-character.js > is-word-character.min.js", + "build-md": "remark . -qfo", + "lint": "xo", + "test": "npm run build && npm run lint && npm run test-coverage", + "test-api": "node test", + "test-coverage": "nyc --reporter lcov tape test.js" + }, + "version": "1.0.1", + "xo": { + "space": true, + "esnext": false, + "ignores": [ + "is-word-character.js" + ] + } +} diff --git a/tools/node_modules/eslint/node_modules/is-word-character/readme.md b/tools/node_modules/eslint/node_modules/is-word-character/readme.md new file mode 100644 index 0000000000..acf4f2a011 --- /dev/null +++ b/tools/node_modules/eslint/node_modules/is-word-character/readme.md @@ -0,0 +1,60 @@ +# is-word-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] + +Check if a character is a word character (`\w`, which equals +`[a-zA-Z0-9_]`). + +## Installation + +[npm][]: + +```bash +npm install is-word-character +``` + +## Usage + +```javascript +var wordCharacter = require('is-word-character'); + +wordCharacter('a'); //=> true +wordCharacter('Z'); //=> true +wordCharacter('0'); //=> true +wordCharacter('_'); //=> true +wordCharacter(' '); //=> false +wordCharacter('💩'); //=> false +``` + +## API + +### `wordCharacter(character|code)` + +Check whether the given character code (`number`), or the character +code at the first position (`string`), is a word character. + +## Related + +* [`is-alphabetical`](https://github.com/wooorm/is-alphabetical) +* [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical) +* [`is-decimal`](https://github.com/wooorm/is-decimal) +* [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal) +* [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character) + +## License + +[MIT][license] © [Titus Wormer][author] + +<!-- Definitions --> + +[travis-badge]: https://img.shields.io/travis/wooorm/is-word-character.svg + +[travis]: https://travis-ci.org/wooorm/is-word-character + +[codecov-badge]: https://img.shields.io/codecov/c/github/wooorm/is-word-character.svg + +[codecov]: https://codecov.io/github/wooorm/is-word-character + +[npm]: https://docs.npmjs.com/cli/install + +[license]: LICENSE + +[author]: http://wooorm.com |