Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
white-space-x
Advanced tools
List of ECMAScript white space characters.
.list
: Array.<CharRecord>
.string
: string
.string5
: string
.string2015
: string
.string2016
: string
.string2017
: string
.string2018
: string
~CharRecord
: Object
white-space-x.list
: Array.<CharRecord>
An array of the whitespace char codes, string, descriptions and language presence in the specifications.
Kind: static property of white-space-x
Example
import * as whiteSpace from 'white-space-x';
whiteSpaces.list.foreach(function(item) {
console.log(lib.description, item.code, item.string);
});
white-space-x.string
: string
A string of the ES2017 to ES2018 whitespace characters.
Kind: static property of white-space-x
white-space-x.string5
: string
A string of the ES5 to ES2016 whitespace characters.
Kind: static property of white-space-x
white-space-x.string2015
: string
A string of the ES5 to ES2016 whitespace characters.
Kind: static property of white-space-x
white-space-x.string2016
: string
A string of the ES5 to ES2016 whitespace characters.
Kind: static property of white-space-x
Example
import * as whiteSpace from 'white-space-x';
const characters = [
'\u0009',
'\u000a',
'\u000b',
'\u000c',
'\u000d',
'\u0020',
'\u00a0',
'\u1680',
'\u180e',
'\u2000',
'\u2001',
'\u2002',
'\u2003',
'\u2004',
'\u2005',
'\u2006',
'\u2007',
'\u2008',
'\u2009',
'\u200a',
'\u2028',
'\u2029',
'\u202f',
'\u205f',
'\u3000',
'\ufeff',
];
const ws = characters.join('');
const re1 = new RegExp('^[' + whiteSpace.string2016 + ']+$)');
console.log(re1.test(ws)); // true
white-space-x.string2017
: string
A string of the ES2017 to ES2018 whitespace characters.
Kind: static property of white-space-x
white-space-x.string2018
: string
A string of the ES2017 to ES2018 whitespace characters.
Kind: static property of white-space-x
Example
import * as whiteSpace from 'white-space-x';
const characters = [
'\u0009',
'\u000a',
'\u000b',
'\u000c',
'\u000d',
'\u0020',
'\u00a0',
'\u1680',
'\u2000',
'\u2001',
'\u2002',
'\u2003',
'\u2004',
'\u2005',
'\u2006',
'\u2007',
'\u2008',
'\u2009',
'\u200a',
'\u2028',
'\u2029',
'\u202f',
'\u205f',
'\u3000',
'\ufeff',
];
const ws = characters.join('');
const re1 = new RegExp('^[' + whiteSpace.string2018 + ']+$)');
console.log(re1.test(ws)); // true
white-space-x~CharRecord
: Object
A record of a white space character.
Kind: inner typedef of white-space-x
Properties
Name | Type | Description |
---|---|---|
code | number | The character code. |
description | string | A description of the character. |
es5 | boolean | Whether the spec lists this as a white space. |
es2015 | boolean | Whether the spec lists this as a white space. |
es2016 | boolean | Whether the spec lists this as a white space. |
es2017 | boolean | Whether the spec lists this as a white space. |
es2018 | boolean | Whether the spec lists this as a white space. |
string | string | The character string. |
FAQs
List of ECMAScript white space characters.
The npm package white-space-x receives a total of 2,904 weekly downloads. As such, white-space-x popularity was classified as popular.
We found that white-space-x demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.