is-word-character
Advanced tools
Comparing version 1.0.1 to 1.0.2
10
index.js
@@ -1,7 +0,7 @@ | ||
'use strict'; | ||
'use strict' | ||
module.exports = wordCharacter; | ||
module.exports = wordCharacter | ||
var fromCode = String.fromCharCode; | ||
var re = /\w/; | ||
var fromCode = String.fromCharCode | ||
var re = /\w/ | ||
@@ -13,3 +13,3 @@ /* Check if the given character code, or the character | ||
typeof character === 'number' ? fromCode(character) : character.charAt(0) | ||
); | ||
) | ||
} |
{ | ||
"name": "is-word-character", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Check if a character is a word character", | ||
@@ -24,23 +24,35 @@ "license": "MIT", | ||
"devDependencies": { | ||
"browserify": "^14.1.0", | ||
"browserify": "^16.0.0", | ||
"esmangle": "^1.0.1", | ||
"nyc": "^11.0.0", | ||
"remark-cli": "^3.0.0", | ||
"remark-preset-wooorm": "^3.0.0", | ||
"prettier": "^1.12.1", | ||
"remark-cli": "^5.0.0", | ||
"remark-preset-wooorm": "^4.0.0", | ||
"tape": "^4.0.0", | ||
"xo": "^0.18.0" | ||
"xo": "^0.20.0" | ||
}, | ||
"scripts": { | ||
"build-md": "remark . -qfo", | ||
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix", | ||
"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": "npm run build-md && npm run build-bundle && npm run build-mangle", | ||
"lint": "xo", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
"test-api": "node test", | ||
"test-coverage": "nyc --reporter lcov tape test.js", | ||
"test": "npm run build && npm run lint && npm run test-coverage" | ||
"test": "npm run format && npm run build && npm run test-coverage" | ||
}, | ||
"prettier": { | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"semi": false, | ||
"trailingComma": "none" | ||
}, | ||
"xo": { | ||
"space": true, | ||
"prettier": true, | ||
"esnext": false, | ||
"rules": { | ||
"no-var": "off", | ||
"prefer-arrow-callback": "off" | ||
}, | ||
"ignores": [ | ||
@@ -47,0 +59,0 @@ "is-word-character.js" |
@@ -17,10 +17,10 @@ # is-word-character [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
```javascript | ||
var wordCharacter = require('is-word-character'); | ||
var wordCharacter = require('is-word-character') | ||
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 | ||
``` | ||
@@ -27,0 +27,0 @@ |
4745
8