white-space-x
Advanced tools
Comparing version 3.0.1 to 4.0.0
141
package.json
{ | ||
"name": "white-space-x", | ||
"version": "3.0.1", | ||
"version": "4.0.0", | ||
"description": "List of ECMAScript white space characters.", | ||
@@ -19,5 +19,25 @@ "homepage": "https://github.com/Xotic750/white-space-x", | ||
], | ||
"main": "index.js", | ||
"engines": { | ||
"node": "*" | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"browser": "dist/white-space-x.min.js", | ||
"module": "src/white-space-x.js", | ||
"main": "dist/white-space-x.js", | ||
"scripts": { | ||
"build:base": "webpack --bail --progress --profile --colors", | ||
"build": "cross-env NODE_ENV=production npm run build:base --", | ||
"build:dev": "npm run build:base --", | ||
"clean": "rimraf dist && npm run clean:coverage", | ||
"clean:coverage": "rimraf __tests__/coverage", | ||
"lint": "eslint -f 'node_modules/eslint-friendly-formatter' --ext .js .", | ||
"lint-fix": "npm run lint -- --fix", | ||
"report": "npm run build -- --env.report", | ||
"report:dev": "npm run build:dev -- --env.report", | ||
"security": "npm audit", | ||
"security-fix": "npm run security -- fix", | ||
"start": "nodemon --exec \"npm run build\" --watch src", | ||
"test": "npm run clean:coverage && jest", | ||
"test:ci": "npm run test -- --ci --maxWorkers=2", | ||
"test:coverage": "npm run test -- --coverage" | ||
}, | ||
@@ -34,55 +54,64 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@xotic750/eslint-config-standard-x": "^3.1.1", | ||
"ajv": "^6.1.1", | ||
"browserify": "^16.1.0", | ||
"browserify-derequire": "^0.9.4", | ||
"cross-env": "^5.1.3", | ||
"es5-shim": "^4.5.10", | ||
"es6-shim": "^0.35.3", | ||
"es7-shim": "^6.0.0", | ||
"eslint": "^4.18.1", | ||
"eslint-plugin-compat": "^2.2.0", | ||
"eslint-plugin-css-modules": "^2.7.5", | ||
"eslint-plugin-eslint-comments": "^2.0.2", | ||
"eslint-plugin-jsdoc": "^3.5.0", | ||
"eslint-plugin-json": "^1.2.0", | ||
"eslint-plugin-no-use-extend-native": "^0.3.12", | ||
"husky": "^0.13.4", | ||
"jasmine-node": "^1.14.5", | ||
"jsdoc-to-markdown": "^4.0.1", | ||
"json3": "^3.3.2", | ||
"make-jasmine-spec-runner-html": "^1.3.0", | ||
"ncp": "^2.0.0", | ||
"nodemon": "^1.15.1", | ||
"nsp": "^3.2.1", | ||
"parallelshell": "^3.0.2", | ||
"replace-x": "^1.5.0", | ||
"rimraf": "^2.6.2", | ||
"serve": "^6.4.11", | ||
"uglify-js": "^3.3.12" | ||
"@babel/cli": "^7.5.0", | ||
"@babel/core": "^7.5.4", | ||
"@babel/plugin-transform-property-mutators": "^7.2.0", | ||
"@babel/plugin-transform-runtime": "^7.5.0", | ||
"@babel/preset-env": "^7.5.4", | ||
"@babel/runtime": "^7.5.4", | ||
"@prorenata/eslint-config-vue": "^1.13.5", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.6.1", | ||
"@typescript-eslint/eslint-plugin": "^1.11.0", | ||
"@typescript-eslint/parser": "^1.11.0", | ||
"babel-core": "^7.0.0-0", | ||
"babel-eslint": "^10.0.2", | ||
"babel-loader": "^8.0.6", | ||
"cross-env": "^5.2.0", | ||
"eslint": "=5.16.0", | ||
"eslint-config-airbnb-base": "^13.2.0", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-friendly-formatter": "^4.0.1", | ||
"eslint-import-resolver-webpack": "^0.11.1", | ||
"eslint-loader": "^2.2.1", | ||
"eslint-plugin-babel": "^5.3.0", | ||
"eslint-plugin-compat": "^3.2.0", | ||
"eslint-plugin-css-modules": "^2.11.0", | ||
"eslint-plugin-eslint-comments": "^3.1.2", | ||
"eslint-plugin-html": "^6.0.0", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jest": "^22.7.2", | ||
"eslint-plugin-jsdoc": "^15.3.2", | ||
"eslint-plugin-json": "^1.4.0", | ||
"eslint-plugin-lodash": "^5.1.0", | ||
"eslint-plugin-no-use-extend-native": "^0.4.1", | ||
"eslint-plugin-prefer-object-spread": "^1.2.1", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-sort-class-members": "^1.5.0", | ||
"eslint-plugin-switch-case": "^1.1.2", | ||
"eslint-plugin-vue": "^5.2.3", | ||
"friendly-errors-webpack-plugin": "^1.7.0", | ||
"jest": "^24.8.0", | ||
"jest-cli": "^24.8.0", | ||
"jest-css": "^1.0.1", | ||
"jest-file": "^1.0.0", | ||
"lodash": "^4.17.13", | ||
"prettier": "=1.14.3", | ||
"rimraf": "^2.6.3", | ||
"semver": "^6.2.0", | ||
"terser-webpack-plugin": "^1.3.0", | ||
"typescript": "^3.5.3", | ||
"webpack": "^4.35.3", | ||
"webpack-bundle-analyzer": "^3.3.2", | ||
"webpack-cli": "^3.3.5", | ||
"webpack-merge": "^4.2.1" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf README.md lib/*", | ||
"clean:jasmine": "rimraf tests/index.html tests/run.js", | ||
"clean:all": "npm run clean:jasmine && npm run clean", | ||
"build": "npm run clean && npm run lint && npm run browserify && npm run uglify && npm run docs && npm test && npm run security", | ||
"build:jasmine": "npm run clean:jasmine && make-jasmine-spec-runner-html", | ||
"build:setver": "replace-x \" @version .*\" \" @version $(node -p -e \"require('./package.json').version\")\" index.js", | ||
"build:name": "replace-x \" @module .*\" \" @module $(node -p -e \"require('./package.json').name\")\" index.js", | ||
"build:description": "replace-x \" @file .*\" \" @file $(node -p -e \"require('./package.json').description\")\" index.js", | ||
"build:replace": "npm run build:setver && npm run build:name && npm run build:description", | ||
"production": "npm run clean:all && npm run build:jasmine && npm run build:replace && npm run build", | ||
"start": "parallelshell \"serve\" \"nodemon --watch index.js --exec 'npm run build'\"", | ||
"docs:name": "replace-x \"@{PACKAGE-NAME}\" \"$(node -p -e \"require('./package.json').name\")\" README.md", | ||
"docs:badges": "ncp badges.html README.md && npm run docs:name", | ||
"docs": "npm run docs:badges && jsdoc2md --name-format --example-lang js index.js >> README.md", | ||
"lint": "eslint *.js tests/spec/*.js", | ||
"lint-fix": "npm run lint -- --fix", | ||
"security": "nsp check", | ||
"test": "jasmine-node --matchall tests/spec/", | ||
"browserify": "browserify -p browserify-derequire -e index.js -o lib/white-space-x.js -u 'crypto' -s returnExports", | ||
"uglify": "uglifyjs lib/white-space-x.js -o lib/white-space-x.min.js --config-file .uglifyjsrc.json", | ||
"precommit": "npm run production", | ||
"prepush": "npm run production" | ||
} | ||
"engines": { | ||
"node": ">=8.11.4", | ||
"npm": "6.4.1" | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"Explorer >= 9" | ||
] | ||
} |
@@ -24,24 +24,21 @@ <a href="https://travis-ci.org/Xotic750/white-space-x" | ||
## white-space-x | ||
List of ECMAScript white space characters. | ||
**Version**: 3.0.1 | ||
**Author**: Xotic750 <Xotic750@gmail.com> | ||
**License**: [MIT](<https://opensource.org/licenses/MIT>) | ||
**Copyright**: Xotic750 | ||
- [white-space-x](#module_white-space-x) | ||
- _static_ | ||
- [`.list`](#module_white-space-x.list) : <code>Array.<CharRecord></code> | ||
- [`.string`](#module_white-space-x.string) : <code>string</code> | ||
- [`.string5`](#module_white-space-x.string5) : <code>string</code> | ||
- [`.string2015`](#module_white-space-x.string2015) : <code>string</code> | ||
- [`.string2016`](#module_white-space-x.string2016) : <code>string</code> | ||
- [`.string2017`](#module_white-space-x.string2017) : <code>string</code> | ||
- [`.string2018`](#module_white-space-x.string2018) : <code>string</code> | ||
- _inner_ | ||
- [`~CharRecord`](#module_white-space-x..CharRecord) : <code>Object</code> | ||
* [white-space-x](#module_white-space-x) | ||
* _static_ | ||
* [`.list`](#module_white-space-x.list) : <code>Array.<CharRecord></code> | ||
* [`.string`](#module_white-space-x.string) : <code>string</code> | ||
* [`.string5`](#module_white-space-x.string5) : <code>string</code> | ||
* [`.string2015`](#module_white-space-x.string2015) : <code>string</code> | ||
* [`.string2016`](#module_white-space-x.string2016) : <code>string</code> | ||
* [`.string2017`](#module_white-space-x.string2017) : <code>string</code> | ||
* [`.string2018`](#module_white-space-x.string2018) : <code>string</code> | ||
* _inner_ | ||
* [`~CharRecord`](#module_white-space-x..CharRecord) : <code>Object</code> | ||
<a name="module_white-space-x.list"></a> | ||
### `white-space-x.list` : <code>Array.<CharRecord></code> | ||
An array of the whitespace char codes, string, descriptions and language | ||
@@ -51,12 +48,15 @@ presence in the specifications. | ||
**Kind**: static property of [<code>white-space-x</code>](#module_white-space-x) | ||
**Example** | ||
**Example** | ||
```js | ||
var whiteSpace = require('white-space-x'); | ||
whiteSpaces.list.foreach(function (item) { | ||
import * as whiteSpace from 'white-space-x'; | ||
whiteSpaces.list.foreach(function(item) { | ||
console.log(lib.description, item.code, item.string); | ||
}); | ||
``` | ||
<a name="module_white-space-x.string"></a> | ||
### `white-space-x.string` : <code>string</code> | ||
A string of the ES2017 to ES2018 whitespace characters. | ||
@@ -68,2 +68,3 @@ | ||
### `white-space-x.string5` : <code>string</code> | ||
A string of the ES5 to ES2016 whitespace characters. | ||
@@ -75,2 +76,3 @@ | ||
### `white-space-x.string2015` : <code>string</code> | ||
A string of the ES5 to ES2016 whitespace characters. | ||
@@ -82,9 +84,11 @@ | ||
### `white-space-x.string2016` : <code>string</code> | ||
A string of the ES5 to ES2016 whitespace characters. | ||
**Kind**: static property of [<code>white-space-x</code>](#module_white-space-x) | ||
**Example** | ||
**Example** | ||
```js | ||
var whiteSpace = require('white-space-x'); | ||
var characters = [ | ||
import * as whiteSpace from 'white-space-x'; | ||
const characters = [ | ||
'\u0009', | ||
@@ -115,11 +119,13 @@ '\u000a', | ||
'\u3000', | ||
'\ufeff' | ||
'\ufeff', | ||
]; | ||
var ws = characters.join(''); | ||
var re1 = new RegExp('^[' + whiteSpace.string2016 + ']+$)'); | ||
re1.test(ws); // true | ||
const ws = characters.join(''); | ||
const re1 = new RegExp('^[' + whiteSpace.string2016 + ']+$)'); | ||
console.log(re1.test(ws)); // true | ||
``` | ||
<a name="module_white-space-x.string2017"></a> | ||
### `white-space-x.string2017` : <code>string</code> | ||
A string of the ES2017 to ES2018 whitespace characters. | ||
@@ -131,9 +137,11 @@ | ||
### `white-space-x.string2018` : <code>string</code> | ||
A string of the ES2017 to ES2018 whitespace characters. | ||
**Kind**: static property of [<code>white-space-x</code>](#module_white-space-x) | ||
**Example** | ||
**Example** | ||
```js | ||
var whiteSpace = require('white-space-x'); | ||
var characters = [ | ||
import * as whiteSpace from 'white-space-x'; | ||
const characters = [ | ||
'\u0009', | ||
@@ -163,11 +171,13 @@ '\u000a', | ||
'\u3000', | ||
'\ufeff' | ||
'\ufeff', | ||
]; | ||
var ws = characters.join(''); | ||
var re1 = new RegExp('^[' + whiteSpace.string2018 + ']+$)'); | ||
re1.test(ws); // true | ||
const ws = characters.join(''); | ||
const re1 = new RegExp('^[' + whiteSpace.string2018 + ']+$)'); | ||
console.log(re1.test(ws)); // true | ||
``` | ||
<a name="module_white-space-x..CharRecord"></a> | ||
### `white-space-x~CharRecord` : <code>Object</code> | ||
A record of a white space character. | ||
@@ -178,12 +188,11 @@ | ||
| Name | Type | Description | | ||
| --- | --- | --- | | ||
| code | <code>number</code> | The character code. | | ||
| description | <code>string</code> | A description of the character. | | ||
| es5 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2015 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2016 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2017 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2018 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| string | <code>string</code> | The character string. | | ||
| Name | Type | Description | | ||
| ----------- | -------------------- | --------------------------------------------- | | ||
| code | <code>number</code> | The character code. | | ||
| description | <code>string</code> | A description of the character. | | ||
| es5 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2015 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2016 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2017 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| es2018 | <code>boolean</code> | Whether the spec lists this as a white space. | | ||
| string | <code>string</code> | The character string. | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
63936
0
190
0
53
8
806
1