is-word-character
Advanced tools
Comparing version 1.0.0 to 1.0.1
23
index.js
@@ -1,29 +0,10 @@ | ||
/** | ||
* @author Titus Wormer | ||
* @copyright 2016 Titus Wormer | ||
* @license MIT | ||
* @module is-word-character | ||
* @fileoverview Check if a character is a word character. | ||
*/ | ||
'use strict'; | ||
/* eslint-env commonjs */ | ||
/* Expose. */ | ||
module.exports = wordCharacter; | ||
/* Methods. */ | ||
var fromCode = String.fromCharCode; | ||
/* Constants. */ | ||
var re = /\w/; | ||
/** | ||
* Check whether the given character code, or the character | ||
* code at the first character, is a word character. | ||
* | ||
* @param {string|number} character | ||
* @return {boolean} - Whether `character` is a word character. | ||
*/ | ||
/* Check if the given character code, or the character | ||
* code at the first character, is a word character. */ | ||
function wordCharacter(character) { | ||
@@ -30,0 +11,0 @@ return re.test( |
{ | ||
"name": "is-word-character", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Check if a character is a word character", | ||
@@ -13,6 +13,3 @@ "license": "MIT", | ||
], | ||
"files": [ | ||
"index.js" | ||
], | ||
"repository": "https://github.com/wooorm/is-word-character", | ||
"repository": "wooorm/is-word-character", | ||
"bugs": "https://github.com/wooorm/is-word-character/issues", | ||
@@ -23,17 +20,17 @@ "author": "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)", | ||
], | ||
"files": [ | ||
"index.js" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"browserify": "^13.0.1", | ||
"browserify": "^14.1.0", | ||
"esmangle": "^1.0.1", | ||
"nyc": "^7.0.0", | ||
"remark-cli": "^1.0.0", | ||
"remark-comment-config": "^4.0.0", | ||
"remark-github": "^5.0.0", | ||
"remark-lint": "^4.0.0", | ||
"remark-validate-links": "^4.0.0", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"tape": "^4.0.0", | ||
"xo": "^0.16.0" | ||
"xo": "^0.18.0" | ||
}, | ||
"scripts": { | ||
"build-md": "remark . --quiet --frail", | ||
"build-md": "remark . -qfo", | ||
"build-bundle": "browserify index.js --bare -s isWordCharacter > is-word-character.js", | ||
@@ -49,5 +46,5 @@ "build-mangle": "esmangle < is-word-character.js > is-word-character.min.js", | ||
"space": true, | ||
"esnext": false, | ||
"ignores": [ | ||
"is-word-character.js", | ||
"is-word-character.min.js" | ||
"is-word-character.js" | ||
] | ||
@@ -62,13 +59,6 @@ }, | ||
"remarkConfig": { | ||
"output": true, | ||
"plugins": [ | ||
"comment-config", | ||
"github", | ||
"lint", | ||
"validate-links" | ||
], | ||
"settings": { | ||
"bullet": "*" | ||
} | ||
"preset-wooorm" | ||
] | ||
} | ||
} |
# is-word-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
<!--lint disable heading-increment list-item-spacing--> | ||
Check if a character is a word character (`\w`, which equals | ||
@@ -10,3 +8,3 @@ `[a-zA-Z0-9_]`). | ||
[npm][npm-install]: | ||
[npm][]: | ||
@@ -22,8 +20,8 @@ ```bash | ||
wordCharacter('a'); // true | ||
wordCharacter('Z'); // true | ||
wordCharacter('0'); // true | ||
wordCharacter('_'); // true | ||
wordCharacter(' '); // false | ||
wordCharacter('💩'); // false | ||
wordCharacter('a'); //=> true | ||
wordCharacter('Z'); //=> true | ||
wordCharacter('0'); //=> true | ||
wordCharacter('_'); //=> true | ||
wordCharacter(' '); //=> false | ||
wordCharacter('💩'); //=> false | ||
``` | ||
@@ -33,3 +31,3 @@ | ||
### `wordCharacter(character)` | ||
### `wordCharacter(character|code)` | ||
@@ -61,3 +59,3 @@ Check whether the given character code (`number`), or the character | ||
[npm-install]: https://docs.npmjs.com/cli/install | ||
[npm]: https://docs.npmjs.com/cli/install | ||
@@ -64,0 +62,0 @@ [license]: LICENSE |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
7
4472
4
11
61