Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

white-space-x

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

white-space-x - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

.eslintignore

17

.eslintrc.json
{
"root": true,
"extends": "@ljharb",
"plugins": [
"import"
],
"rules": {
"indent": ["error", 2, {
"SwitchCase": 1
}],
"global-require": 0,
"max-params": 0,
"block-scoped-var": 1
}
}
"extends": [
"@xotic750/eslint-config-standard-x"
]
}
/**
* @file
* <a href="https://travis-ci.org/Xotic750/white-space-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/white-space-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/white-space-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/white-space-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/white-space-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/white-space-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/white-space-x" title="npm version">
* <img src="https://badge.fury.io/js/white-space-x.svg"
* alt="npm version" height="18">
* </a>
*
* List of ECMAScript5 white space characters.
*
* @version 1.2.0
* @file List of ECMAScript5 white space characters.
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -32,104 +10,211 @@ * @copyright Xotic750

/* eslint strict: 1, max-len:1 */
'use strict';
/* global module */
var forEach = require('for-each');
;(function () { // eslint-disable-line no-extra-semi
/**
* An array of the ES5 whitespace char codes, string, and their descriptions.
*
* @name list
* @type Array.<Object>
* @example
* var whiteSpace = require('white-space-x');
* whiteSpaces.list.foreach(function (item) {
* console.log(lib.description, item.code, item.string);
* });
*/
var list = [
{
code: 0x0009,
description: 'Tab',
string: '\u0009'
},
{
code: 0x000a,
description: 'Line Feed',
string: '\u000a'
},
{
code: 0x000b,
description: 'Vertical Tab',
string: '\u000b'
},
{
code: 0x000c,
description: 'Form Feed',
string: '\u000c'
},
{
code: 0x000d,
description: 'Carriage Return',
string: '\u000d'
},
{
code: 0x0020,
description: 'Space',
string: '\u0020'
},
/*
{
code: 0x0085,
description: 'Next line - Not ES5 whitespace',
string: '\u0085'
}
*/
{
code: 0x00a0,
description: 'No-break space',
string: '\u00a0'
},
{
code: 0x1680,
description: 'Ogham space mark',
string: '\u1680'
},
{
code: 0x180e,
description: 'Mongolian vowel separator',
string: '\u180e'
},
{
code: 0x2000,
description: 'En quad',
string: '\u2000'
},
{
code: 0x2001,
description: 'Em quad',
string: '\u2001'
},
{
code: 0x2002,
description: 'En space',
string: '\u2002'
},
{
code: 0x2003,
description: 'Em space',
string: '\u2003'
},
{
code: 0x2004,
description: 'Three-per-em space',
string: '\u2004'
},
{
code: 0x2005,
description: 'Four-per-em space',
string: '\u2005'
},
{
code: 0x2006,
description: 'Six-per-em space',
string: '\u2006'
},
{
code: 0x2007,
description: 'Figure space',
string: '\u2007'
},
{
code: 0x2008,
description: 'Punctuation space',
string: '\u2008'
},
{
code: 0x2009,
description: 'Thin space',
string: '\u2009'
},
{
code: 0x200a,
description: 'Hair space',
string: '\u200a'
},
/*
{
code: 0x200b,
description: 'Zero width space - Not ES5 whitespace',
string: '\u200b'
},
*/
{
code: 0x2028,
description: 'Line separator',
string: '\u2028'
},
{
code: 0x2029,
description: 'Paragraph separator',
string: '\u2029'
},
{
code: 0x202f,
description: 'Narrow no-break space',
string: '\u202f'
},
{
code: 0x205f,
description: 'Medium mathematical space',
string: '\u205f'
},
{
code: 0x3000,
description: 'Ideographic space',
string: '\u3000'
},
{
code: 0xfeff,
description: 'Byte Order Mark',
string: '\ufeff'
}
];
'use strict';
var string = '';
forEach(list, function reducer(item) {
string += item.string;
});
var define = require('define-properties-x');
var forEach = require('foreach');
/**
* An array of the whitespace char codes.
*
* @name whiteSpaces
* @type Array.<number>
* @property {number} 0 0x0009 // Tab
* @property {number} 1 0x000a // Line Feed
* @property {number} 2 0x000b // Vertical Tab
* @property {number} 3 0x000c // Form Feed
* @property {number} 4 0x000d // Carriage Return
* @property {number} 5 0x0020 // Space
* @property {number} 6 0x00a0 // No-break space
* @property {number} 7 0x1680 // Ogham space mark
* @property {number} 8 0x180e // Mongolian vowel separator
* @property {number} 9 0x2000 // En quad
* @property {number} 10 0x2001 // Em quad
* @property {number} 11 0x2002 // En space
* @property {number} 12 0x2003 // Em space
* @property {number} 13 0x2004 // Three-per-em space
* @property {number} 14 0x2005 // Four-per-em space
* @property {number} 15 0x2006 // Six-per-em space
* @property {number} 16 0x2007 // Figure space
* @property {number} 17 0x2008 // Punctuation space
* @property {number} 18 0x2009 // Thin space
* @property {number} 19 0x200a // Hair space
* @property {number} 20 0x2028 // Line separator
* @property {number} 21 0x2029 // Paragraph separator
* @property {number} 22 0x202f // Narrow no-break space
* @property {number} 23 0x205f // Medium mathematical space
* @property {number} 24 0x3000 // Ideographic space
* @property {number} 25 0xfeff // Byte Order Mark
* @example
* var lib = require('white-space-x');
* var count = 0x110000;
* var nws = ''; // A string of all the non-whitepaces
* do {
* count -= 1;
* if (lib.whiteSpaces.indexOf(count) < 0) {
* nws = String.fromCodePoint(count) + nws;
* }
* } while (count);
*/
define.property(module.exports, 'whiteSpaces', [
0x0009, // Tab
0x000a, // Line Feed
0x000b, // Vertical Tab
0x000c, // Form Feed
0x000d, // Carriage Return
0x0020, // Space
// 0x0085, // Next line - Not ES5 whitespace
0x00a0, // No-break space
0x1680, // Ogham space mark
0x180e, // Mongolian vowel separator
0x2000, // En quad
0x2001, // Em quad
0x2002, // En space
0x2003, // Em space
0x2004, // Three-per-em space
0x2005, // Four-per-em space
0x2006, // Six-per-em space
0x2007, // Figure space
0x2008, // Punctuation space
0x2009, // Thin space
0x200a, // Hair space
// 0x200b, // Zero width space - Not ES5 whitespace
0x2028, // Line separator
0x2029, // Paragraph separator
0x202f, // Narrow no-break space
0x205f, // Medium mathematical space
0x3000, // Ideographic space
0xfeff // Byte Order Mark
]);
var wsString = '';
forEach(module.exports.whiteSpaces, function (item) {
wsString += String.fromCharCode(item);
});
/**
* A string of the whitespace characters.
*
* @name ws
* @type string
* @default \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
* @example
* var lib = require('white-space-x');
* var ws = '\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';
* var re1 = new RegExp('^[' + lib.ws + ']+$)');
* re1.test(ws); // true
*/
define.property(module.exports, 'ws', wsString);
}());
/**
* A string of the ES5 whitespace characters.
*
* @name string
* @type string
* @example
* var whiteSpace = require('white-space-x');
* var 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'
* ];
* var ws = characters.join('');
* var re1 = new RegExp('^[' + whiteSpace.string + ']+$)');
* re1.test(ws); // true
*/
module.exports = {
list: list,
string: string
};
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.returnExports = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/white-space-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/white-space-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/white-space-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/white-space-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/white-space-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/white-space-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/white-space-x" title="npm version">
* <img src="https://badge.fury.io/js/white-space-x.svg"
* alt="npm version" height="18">
* </a>
*
* List of ECMAScript5 white space characters.
*
* @version 1.2.0
* @file List of ECMAScript5 white space characters.
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -33,839 +11,279 @@ * @copyright Xotic750

/* eslint strict: 1, max-len:1 */
'use strict';
/* global module */
var forEach = _dereq_('for-each');
;(function () { // eslint-disable-line no-extra-semi
/**
* An array of the ES5 whitespace char codes, string, and their descriptions.
*
* @name list
* @type Array.<Object>
* @example
* var whiteSpace = require('white-space-x');
* whiteSpaces.list.foreach(function (item) {
* console.log(lib.description, item.code, item.string);
* });
*/
var list = [
{
code: 0x0009,
description: 'Tab',
string: '\u0009'
},
{
code: 0x000a,
description: 'Line Feed',
string: '\u000a'
},
{
code: 0x000b,
description: 'Vertical Tab',
string: '\u000b'
},
{
code: 0x000c,
description: 'Form Feed',
string: '\u000c'
},
{
code: 0x000d,
description: 'Carriage Return',
string: '\u000d'
},
{
code: 0x0020,
description: 'Space',
string: '\u0020'
},
/*
{
code: 0x0085,
description: 'Next line - Not ES5 whitespace',
string: '\u0085'
}
*/
{
code: 0x00a0,
description: 'No-break space',
string: '\u00a0'
},
{
code: 0x1680,
description: 'Ogham space mark',
string: '\u1680'
},
{
code: 0x180e,
description: 'Mongolian vowel separator',
string: '\u180e'
},
{
code: 0x2000,
description: 'En quad',
string: '\u2000'
},
{
code: 0x2001,
description: 'Em quad',
string: '\u2001'
},
{
code: 0x2002,
description: 'En space',
string: '\u2002'
},
{
code: 0x2003,
description: 'Em space',
string: '\u2003'
},
{
code: 0x2004,
description: 'Three-per-em space',
string: '\u2004'
},
{
code: 0x2005,
description: 'Four-per-em space',
string: '\u2005'
},
{
code: 0x2006,
description: 'Six-per-em space',
string: '\u2006'
},
{
code: 0x2007,
description: 'Figure space',
string: '\u2007'
},
{
code: 0x2008,
description: 'Punctuation space',
string: '\u2008'
},
{
code: 0x2009,
description: 'Thin space',
string: '\u2009'
},
{
code: 0x200a,
description: 'Hair space',
string: '\u200a'
},
/*
{
code: 0x200b,
description: 'Zero width space - Not ES5 whitespace',
string: '\u200b'
},
*/
{
code: 0x2028,
description: 'Line separator',
string: '\u2028'
},
{
code: 0x2029,
description: 'Paragraph separator',
string: '\u2029'
},
{
code: 0x202f,
description: 'Narrow no-break space',
string: '\u202f'
},
{
code: 0x205f,
description: 'Medium mathematical space',
string: '\u205f'
},
{
code: 0x3000,
description: 'Ideographic space',
string: '\u3000'
},
{
code: 0xfeff,
description: 'Byte Order Mark',
string: '\ufeff'
}
];
'use strict';
var string = '';
forEach(list, function reducer(item) {
string += item.string;
});
var define = _dereq_('define-properties-x');
var forEach = _dereq_('foreach');
/**
* An array of the whitespace char codes.
*
* @name whiteSpaces
* @type Array.<number>
* @property {number} 0 0x0009 // Tab
* @property {number} 1 0x000a // Line Feed
* @property {number} 2 0x000b // Vertical Tab
* @property {number} 3 0x000c // Form Feed
* @property {number} 4 0x000d // Carriage Return
* @property {number} 5 0x0020 // Space
* @property {number} 6 0x00a0 // No-break space
* @property {number} 7 0x1680 // Ogham space mark
* @property {number} 8 0x180e // Mongolian vowel separator
* @property {number} 9 0x2000 // En quad
* @property {number} 10 0x2001 // Em quad
* @property {number} 11 0x2002 // En space
* @property {number} 12 0x2003 // Em space
* @property {number} 13 0x2004 // Three-per-em space
* @property {number} 14 0x2005 // Four-per-em space
* @property {number} 15 0x2006 // Six-per-em space
* @property {number} 16 0x2007 // Figure space
* @property {number} 17 0x2008 // Punctuation space
* @property {number} 18 0x2009 // Thin space
* @property {number} 19 0x200a // Hair space
* @property {number} 20 0x2028 // Line separator
* @property {number} 21 0x2029 // Paragraph separator
* @property {number} 22 0x202f // Narrow no-break space
* @property {number} 23 0x205f // Medium mathematical space
* @property {number} 24 0x3000 // Ideographic space
* @property {number} 25 0xfeff // Byte Order Mark
* @example
* var lib = require('white-space-x');
* var count = 0x110000;
* var nws = ''; // A string of all the non-whitepaces
* do {
* count -= 1;
* if (lib.whiteSpaces.indexOf(count) < 0) {
* nws = String.fromCodePoint(count) + nws;
* }
* } while (count);
*/
define.property(module.exports, 'whiteSpaces', [
0x0009, // Tab
0x000a, // Line Feed
0x000b, // Vertical Tab
0x000c, // Form Feed
0x000d, // Carriage Return
0x0020, // Space
// 0x0085, // Next line - Not ES5 whitespace
0x00a0, // No-break space
0x1680, // Ogham space mark
0x180e, // Mongolian vowel separator
0x2000, // En quad
0x2001, // Em quad
0x2002, // En space
0x2003, // Em space
0x2004, // Three-per-em space
0x2005, // Four-per-em space
0x2006, // Six-per-em space
0x2007, // Figure space
0x2008, // Punctuation space
0x2009, // Thin space
0x200a, // Hair space
// 0x200b, // Zero width space - Not ES5 whitespace
0x2028, // Line separator
0x2029, // Paragraph separator
0x202f, // Narrow no-break space
0x205f, // Medium mathematical space
0x3000, // Ideographic space
0xfeff // Byte Order Mark
]);
var wsString = '';
forEach(module.exports.whiteSpaces, function (item) {
wsString += String.fromCharCode(item);
});
/**
* A string of the whitespace characters.
*
* @name ws
* @type string
* @default \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
* @example
* var lib = require('white-space-x');
* var ws = '\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';
* var re1 = new RegExp('^[' + lib.ws + ']+$)');
* re1.test(ws); // true
*/
define.property(module.exports, 'ws', wsString);
}());
},{"define-properties-x":2,"foreach":3}],2:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/define-properties-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/define-properties-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/define-properties-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/define-properties-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/define-properties-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/define-properties-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/define-properties-x" title="npm version">
* <img src="https://badge.fury.io/js/define-properties-x.svg"
* alt="npm version" height="18">
* </a>
* A string of the ES5 whitespace characters.
*
* Define multiple non-enumerable properties at once.
*
* Requires ES3 or above.
*
* @see {@link https://www.npmjs.com/package/define-properties|define-properties}
*
* @version 1.3.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module define-properties-x
* @name string
* @type string
* @example
* var whiteSpace = require('white-space-x');
* var 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'
* ];
* var ws = characters.join('');
* var re1 = new RegExp('^[' + whiteSpace.string + ']+$)');
* re1.test(ws); // true
*/
module.exports = {
list: list,
string: string
};
/* eslint strict: 1, max-statements: 1, id-length: 1, no-restricted-syntax: 1,
no-param-reassign: 1 */
},{"for-each":2}],2:[function(_dereq_,module,exports){
var isFunction = _dereq_('is-function')
/* global module */
module.exports = forEach
;(function () { // eslint-disable-line no-extra-semi
var toString = Object.prototype.toString
var hasOwnProperty = Object.prototype.hasOwnProperty
'use strict';
function forEach(list, iterator, context) {
if (!isFunction(iterator)) {
throw new TypeError('iterator must be a function')
}
var hasSymbols = _dereq_('has-symbol-support-x');
var isFunction = _dereq_('is-function-x');
var isUndefined = _dereq_('validate.io-undefined');
var forEach = _dereq_('foreach');
var $keys = isFunction(Object.keys) ? Object.keys : _dereq_('object-keys');
var $getOwnPropertySymbols = isFunction(Object.getOwnPropertySymbols) && Object.getOwnPropertySymbols;
var $defineProperty = isFunction(Object.defineProperty) && Object.defineProperty;
var supportsDescriptors = Boolean($defineProperty) && (function () {
var obj = {};
try {
$defineProperty(obj, 'x', {
enumerable: false,
value: obj
});
for (var unused in obj) {
/* jshint forin:false */
return false;
}
return obj.x === obj;
} catch (e) { /* this is IE 8. */
return false;
if (arguments.length < 3) {
context = this
}
}());
if (toString.call(list) === '[object Array]')
forEachArray(list, iterator, context)
else if (typeof list === 'string')
forEachString(list, iterator, context)
else
forEachObject(list, iterator, context)
}
/**
* Method `property`.
*
* @private
* @param {Object} object The object on which to define the property.
* @param {string|Symbol} prop The property name.
* @param {*} value The value of the property.
* @param {boolean} [force=false] If `true` then set property regardless.
*/
var property = function (object, prop, value, force) {
if (prop in object && !force) {
return;
function forEachArray(array, iterator, context) {
for (var i = 0, len = array.length; i < len; i++) {
if (hasOwnProperty.call(array, i)) {
iterator.call(context, array[i], i, array)
}
}
if (supportsDescriptors) {
$defineProperty(object, prop, {
configurable: true,
enumerable: false,
value: value,
writable: true
});
} else {
object[prop] = value;
}
};
}
/**
* Method `properties`.
*
* @private
* @param {Object} object The object on which to define the property.
* @param {Object} map The object of properties.
* @param {Object} [predicates] The object of property predicates.
*/
var properties = function (object, map, predicates) {
var preds = isUndefined(predicates) ? {} : predicates;
var props = $keys(map);
if (hasSymbols && $getOwnPropertySymbols) {
props = props.concat($getOwnPropertySymbols(map));
function forEachString(string, iterator, context) {
for (var i = 0, len = string.length; i < len; i++) {
// no such thing as a sparse string.
iterator.call(context, string.charAt(i), i, string)
}
forEach(props, function (name) {
var predicate = preds[name];
property(
object,
name,
map[name],
isFunction(predicate) && predicate()
);
});
};
}
properties(module.exports, {
/**
* Define multiple non-enumerable properties at once.
* Uses `Object.defineProperty` when available; falls back to standard
* assignment in older engines. Existing properties are not overridden.
* Accepts a map of property names to a predicate that, when true,
* force-overrides.
*
* @function
* @param {Object} object The object on which to define the property.
* @param {Object} map The object of properties.
* @param {Object} [predicates] The object of property predicates.
* @example
* var define = require('define-properties-x');
* define.properties({
* a: 1,
* b: 2
* }, {
* a: function () { return false; },
* b: function () { return true; }
* });
*/
properties: properties,
/**
* Just like `properties` but for defining a single non-enumerable
* property. Useful in environments that do not
* support `Computed property names`. This can be done
* with `properties`, but this method can read a little cleaner.
*
* @function
* @param {Object} object The object on which to define the property.
* @param {string|Symbol} prop The property name.
* @param {*} value The value of the property.
* @param {boolean} [force=false] If `true` then set property regardless.
* @example
* var define = require('define-properties-x');
* var myString = 'something';
* define.property(obj, Symbol.iterator, function () {}, true);
* define.property(obj, myString, function () {}, true);
*/
property: property,
/**
* Boolean indicator as to whether the environments supports descriptors
* or not.
*
* @type boolean
* @example
* var define = require('define-properties-x');
* define.supportsDescriptors; // true or false
*/
supportsDescriptors: supportsDescriptors
});
}());
},{"foreach":3,"has-symbol-support-x":4,"is-function-x":6,"object-keys":9,"validate.io-undefined":12}],3:[function(_dereq_,module,exports){
var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;
module.exports = function forEach (obj, fn, ctx) {
if (toString.call(fn) !== '[object Function]') {
throw new TypeError('iterator must be a function');
}
var l = obj.length;
if (l === +l) {
for (var i = 0; i < l; i++) {
fn.call(ctx, obj[i], i, obj);
function forEachObject(object, iterator, context) {
for (var k in object) {
if (hasOwnProperty.call(object, k)) {
iterator.call(context, object[k], k, object)
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
}
};
},{}],4:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/has-symbol-support-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/has-symbol-support-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/has-symbol-support-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/has-symbol-support-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/has-symbol-support-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/has-symbol-support-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/has-symbol-support-x" title="npm version">
* <img src="https://badge.fury.io/js/has-symbol-support-x.svg"
* alt="npm version" height="18">
* </a>
*
* Tests if `Symbol` exists and creates the correct type.
*
* Requires ES3 or above.
*
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-symbol-support-x
*/
/* eslint strict: 1, symbol-description: 1 */
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';
/**
* Indicates if `Symbol`exists and creates the correct type.
* `true`, if it exists and creates the correct type, otherwise `false`.
*
* @type boolean
*/
module.exports = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
}());
},{}],5:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/has-to-string-tag-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/has-to-string-tag-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/has-to-string-tag-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/has-to-string-tag-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/has-to-string-tag-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/has-to-string-tag-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/has-to-string-tag-x" title="npm version">
* <img src="https://badge.fury.io/js/has-to-string-tag-x.svg"
* alt="npm version" height="18">
* </a>
*
* Tests if ES6 @@toStringTag is supported.
*
* Requires ES3 or above.
*
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
*
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module has-to-string-tag-x
*/
/* eslint strict: 1 */
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';
/**
* Indicates if `Symbol.toStringTag`exists and is the correct type.
* `true`, if it exists and is the correct type, otherwise `false`.
*
* @type boolean
*/
module.exports = _dereq_('has-symbol-support-x') && typeof Symbol.toStringTag === 'symbol';
}());
},{"has-symbol-support-x":4}],6:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/is-function-x"
* title="Travis status">
* <img
* src="https://travis-ci.org/Xotic750/is-function-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/is-function-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/is-function-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a
* href="https://david-dm.org/Xotic750/is-function-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/is-function-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/is-function-x" title="npm version">
* <img src="https://badge.fury.io/js/is-function-x.svg"
* alt="npm version" height="18">
* </a>
*
* Determine whether a given value is a function object.
*
* @version 1.2.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module is-function-x
*/
/* eslint strict: 1 */
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';
var fToString = Function.prototype.toString;
var toStringTag = _dereq_('to-string-tag-x');
var hasToStringTag = _dereq_('has-to-string-tag-x');
var isPrimitive = _dereq_('is-primitive');
var funcTag = '[object Function]';
var genTag = '[object GeneratorFunction]';
var asyncTag = '[object AsyncFunction]';
/**
* Checks if `value` is classified as a `Function` object.
*
* @private
* @param {*} value The value to check.
* @return {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
*/
var tryFuncToString = function funcToString(value) {
try {
fToString.call(value);
return true;
} catch (ignore) {}
return false;
};
/**
* Checks if `value` is classified as a `Function` object.
*
* @param {*} value The value to check.
* @return {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
* @example
* var isFunction = require('is-function-x');
*
* isFunction(); // false
* isFunction(Number.MIN_VALUE); // false
* isFunction('abc'); // false
* isFunction(true); // false
* isFunction({ name: 'abc' }); // false
* isFunction(function () {}); // true
* isFunction(new Function ()); // true
* isFunction(function* test1() {}); // true
* isFunction(function test2(a, b) {}); // true
* isFunction(class Test {}); // true
* isFunction((x, y) => {return this;}); // true
*/
module.exports = function isFunction(value) {
if (isPrimitive(value)) {
return false;
}
if (hasToStringTag) {
return tryFuncToString(value);
}
var strTag = toStringTag(value);
return strTag === funcTag || strTag === genTag || strTag === asyncTag;
};
}());
},{"has-to-string-tag-x":5,"is-primitive":7,"to-string-tag-x":11}],7:[function(_dereq_,module,exports){
/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
// see http://jsperf.com/testing-value-is-primitive/7
module.exports = function isPrimitive(value) {
return value == null || (typeof value !== 'function' && typeof value !== 'object');
};
},{}],8:[function(_dereq_,module,exports){
/**
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
* Build: `lodash modern modularize exports="npm" -o ./`
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <https://lodash.com/license>
*/
/**
* Checks if `value` is `null`.
*
* @static
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
* @example
*
* _.isNull(null);
* // => true
*
* _.isNull(void 0);
* // => false
*/
function isNull(value) {
return value === null;
}
module.exports = isNull;
},{"is-function":3}],3:[function(_dereq_,module,exports){
module.exports = isFunction
},{}],9:[function(_dereq_,module,exports){
'use strict';
var toString = Object.prototype.toString
// modified from https://github.com/es-shims/es5-shim
var has = Object.prototype.hasOwnProperty;
var toStr = Object.prototype.toString;
var slice = Array.prototype.slice;
var isArgs = _dereq_('./isArguments');
var isEnumerable = Object.prototype.propertyIsEnumerable;
var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
var dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
];
var equalsConstructorPrototype = function (o) {
var ctor = o.constructor;
return ctor && ctor.prototype === o;
function isFunction (fn) {
var string = toString.call(fn)
return string === '[object Function]' ||
(typeof fn === 'function' && string !== '[object RegExp]') ||
(typeof window !== 'undefined' &&
// IE8 and below
(fn === window.setTimeout ||
fn === window.alert ||
fn === window.confirm ||
fn === window.prompt))
};
var excludedKeys = {
$console: true,
$external: true,
$frame: true,
$frameElement: true,
$frames: true,
$innerHeight: true,
$innerWidth: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
$pageYOffset: true,
$parent: true,
$scrollLeft: true,
$scrollTop: true,
$scrollX: true,
$scrollY: true,
$self: true,
$webkitIndexedDB: true,
$webkitStorageInfo: true,
$window: true
};
var hasAutomationEqualityBug = (function () {
/* global window */
if (typeof window === 'undefined') { return false; }
for (var k in window) {
try {
if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
try {
equalsConstructorPrototype(window[k]);
} catch (e) {
return true;
}
}
} catch (e) {
return true;
}
}
return false;
}());
var equalsConstructorPrototypeIfNotBuggy = function (o) {
/* global window */
if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
return equalsConstructorPrototype(o);
}
try {
return equalsConstructorPrototype(o);
} catch (e) {
return false;
}
};
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
var theKeys = [];
if (!isObject && !isFunction && !isArguments) {
throw new TypeError('Object.keys called on a non-object');
}
var skipProto = hasProtoEnumBug && isFunction;
if (isString && object.length > 0 && !has.call(object, 0)) {
for (var i = 0; i < object.length; ++i) {
theKeys.push(String(i));
}
}
if (isArguments && object.length > 0) {
for (var j = 0; j < object.length; ++j) {
theKeys.push(String(j));
}
} else {
for (var name in object) {
if (!(skipProto && name === 'prototype') && has.call(object, name)) {
theKeys.push(String(name));
}
}
}
if (hasDontEnumBug) {
var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
for (var k = 0; k < dontEnums.length; ++k) {
if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
theKeys.push(dontEnums[k]);
}
}
}
return theKeys;
};
keysShim.shim = function shimObjectKeys() {
if (Object.keys) {
var keysWorksWithArguments = (function () {
// Safari 5.0 bug
return (Object.keys(arguments) || '').length === 2;
}(1, 2));
if (!keysWorksWithArguments) {
var originalKeys = Object.keys;
Object.keys = function keys(object) {
if (isArgs(object)) {
return originalKeys(slice.call(object));
} else {
return originalKeys(object);
}
};
}
} else {
Object.keys = keysShim;
}
return Object.keys || keysShim;
};
module.exports = keysShim;
},{"./isArguments":10}],10:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
module.exports = function isArguments(value) {
var str = toStr.call(value);
var isArgs = str === '[object Arguments]';
if (!isArgs) {
isArgs = str !== '[object Array]' &&
value !== null &&
typeof value === 'object' &&
typeof value.length === 'number' &&
value.length >= 0 &&
toStr.call(value.callee) === '[object Function]';
}
return isArgs;
};
},{}],11:[function(_dereq_,module,exports){
/**
* @file
* <a href="https://travis-ci.org/Xotic750/to-string-tag-x"
* title="Travis status">
* <img src="https://travis-ci.org/Xotic750/to-string-tag-x.svg?branch=master"
* alt="Travis status" height="18">
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-tag-x"
* title="Dependency status">
* <img src="https://david-dm.org/Xotic750/to-string-tag-x.svg"
* alt="Dependency status" height="18"/>
* </a>
* <a href="https://david-dm.org/Xotic750/to-string-tag-x#info=devDependencies"
* title="devDependency status">
* <img src="https://david-dm.org/Xotic750/to-string-tag-x/dev-status.svg"
* alt="devDependency status" height="18"/>
* </a>
* <a href="https://badge.fury.io/js/to-string-tag-x" title="npm version">
* <img src="https://badge.fury.io/js/to-string-tag-x.svg"
* alt="npm version" height="18">
* </a>
*
* Get an object's ES6 @@toStringTag.
*
* Requires ES3 or above.
*
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}
*
* @version 1.1.1
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-tag-x
*/
/* eslint strict: 1 */
/* global module */
;(function () { // eslint-disable-line no-extra-semi
'use strict';
var isNull = _dereq_('lodash.isnull');
var isUndefined = _dereq_('validate.io-undefined');
var nullTag = '[object Null]';
var undefTag = '[object Undefined]';
/**
* The `toStringTag` method returns "[object type]", where type is the
* object type.
*
* @param {*} value The object of which to get the object type string.
* @return {string} The object type string.
* @example
* var o = new Object();
*
* toStringTag(o); // returns '[object Object]'
*/
module.exports = function toStringTag(value) {
if (isNull(value)) {
return nullTag;
}
if (isUndefined(value)) {
return undefTag;
}
return Object.prototype.toString.call(value);
};
}());
},{"lodash.isnull":8,"validate.io-undefined":12}],12:[function(_dereq_,module,exports){
/**
*
* VALIDATE: undefined
*
*
* DESCRIPTION:
* - Validates if a value is undefined.
*
*
* NOTES:
* [1]
*
*
* TODO:
* [1]
*
*
* LICENSE:
* MIT
*
* Copyright (c) 2014. Athan Reines.
*
*
* AUTHOR:
* Athan Reines. kgryte@gmail.com. 2014.
*
*/
'use strict';
/**
* FUNCTION: isUndefined( value )
* Validates if a value is undefined.
*
* @param {*} value - value to be validated
* @returns {Boolean} boolean indicating whether value is undefined
*/
function isUndefined( value ) {
return value === void 0;
} // end FUNCTION isUndefined()
// EXPORTS //
module.exports = isUndefined;
},{}]},{},[1])(1)
});

@@ -1,2 +0,9 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.returnExports=t()}}(function(){return function e(t,n,r){function s(i,c){if(!n[i]){if(!t[i]){var u="function"==typeof require&&require;if(!c&&u)return u(i,!0);if(o)return o(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[i].exports}for(var o="function"==typeof require&&require,i=0;i<r.length;i++)s(r[i]);return s}({1:[function(t,e,n){!function(){"use strict";var n=t("define-properties-x"),r=t("foreach");n.property(e.exports,"whiteSpaces",[9,10,11,12,13,32,160,5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279]);var o="";r(e.exports.whiteSpaces,function(t){o+=String.fromCharCode(t)}),n.property(e.exports,"ws",o)}()},{"define-properties-x":2,foreach:3}],2:[function(t,e,n){!function(){"use strict";var n=t("has-symbol-support-x"),r=t("is-function-x"),o=t("validate.io-undefined"),i=t("foreach"),c=r(Object.keys)?Object.keys:t("object-keys"),u=r(Object.getOwnPropertySymbols)&&Object.getOwnPropertySymbols,s=r(Object.defineProperty)&&Object.defineProperty,f=Boolean(s)&&function(){var t={};try{s(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}}(),l=function(t,e,n,r){e in t&&!r||(f?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},a=function(t,e,s){var f=o(s)?{}:s,a=c(e);n&&u&&(a=a.concat(u(e))),i(a,function(n){var o=f[n];l(t,n,e[n],r(o)&&o())})};a(e.exports,{properties:a,property:l,supportsDescriptors:f})}()},{foreach:3,"has-symbol-support-x":4,"is-function-x":6,"object-keys":9,"validate.io-undefined":12}],3:[function(t,e,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=function forEach(t,e,n){if("[object Function]"!==o.call(e))throw new TypeError("iterator must be a function");var i=t.length;if(i===+i)for(var c=0;c<i;c++)e.call(n,t[c],c,t);else for(var u in t)r.call(t,u)&&e.call(n,t[u],u,t)}},{}],4:[function(t,e,n){!function(){"use strict";e.exports="function"==typeof Symbol&&"symbol"==typeof Symbol()}()},{}],5:[function(t,e,n){!function(){"use strict";e.exports=t("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag}()},{"has-symbol-support-x":4}],6:[function(t,e,n){!function(){"use strict";var n=Function.prototype.toString,r=t("to-string-tag-x"),o=t("has-to-string-tag-x"),i=t("is-primitive"),c=function funcToString(t){try{return n.call(t),!0}catch(t){}return!1};e.exports=function isFunction(t){if(i(t))return!1;if(o)return c(t);var e=r(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e}}()},{"has-to-string-tag-x":5,"is-primitive":7,"to-string-tag-x":11}],7:[function(t,e,n){"use strict";e.exports=function isPrimitive(t){return null==t||"function"!=typeof t&&"object"!=typeof t}},{}],8:[function(t,e,n){function isNull(t){return null===t}e.exports=isNull},{}],9:[function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Array.prototype.slice,c=t("./isArguments"),u=Object.prototype.propertyIsEnumerable,s=!u.call({toString:null},"toString"),f=u.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],a=function(t){var e=t.constructor;return e&&e.prototype===t},p={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{a(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),b=function(t){if("undefined"==typeof window||!y)return a(t);try{return a(t)}catch(t){return!1}},d=function keys(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===o.call(t),i=c(t),u=e&&"[object String]"===o.call(t),a=[];if(!e&&!n&&!i)throw new TypeError("Object.keys called on a non-object");var p=f&&n;if(u&&t.length>0&&!r.call(t,0))for(var y=0;y<t.length;++y)a.push(String(y));if(i&&t.length>0)for(var d=0;d<t.length;++d)a.push(String(d));else for(var g in t)p&&"prototype"===g||!r.call(t,g)||a.push(String(g));if(s)for(var h=b(t),v=0;v<l.length;++v)h&&"constructor"===l[v]||!r.call(t,l[v])||a.push(l[v]);return a};d.shim=function shimObjectKeys(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var t=Object.keys;Object.keys=function keys(e){return t(c(e)?i.call(e):e)}}}else Object.keys=d;return Object.keys||d},e.exports=d},{"./isArguments":10}],10:[function(t,e,n){"use strict";var r=Object.prototype.toString;e.exports=function isArguments(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},{}],11:[function(t,e,n){!function(){"use strict";var n=t("lodash.isnull"),r=t("validate.io-undefined");e.exports=function toStringTag(t){return n(t)?"[object Null]":r(t)?"[object Undefined]":Object.prototype.toString.call(t)}}()},{"lodash.isnull":8,"validate.io-undefined":12}],12:[function(t,e,n){"use strict";function isUndefined(t){return void 0===t}e.exports=isUndefined},{}]},{},[1])(1)});
//# sourceMappingURL=lib/white-space-x.map
!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).returnExports=f()}}(function(){return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){/**
* @file List of ECMAScript5 white space characters.
* @version 2.0.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module white-space-x
*/
"use strict";var list=[{code:9,description:"Tab",string:"\t"},{code:10,description:"Line Feed",string:"\n"},{code:11,description:"Vertical Tab",string:"\x0B"},{code:12,description:"Form Feed",string:"\f"},{code:13,description:"Carriage Return",string:"\r"},{code:32,description:"Space",string:" "},{code:160,description:"No-break space",string:"\xa0"},{code:5760,description:"Ogham space mark",string:"\u1680"},{code:6158,description:"Mongolian vowel separator",string:"\u180e"},{code:8192,description:"En quad",string:"\u2000"},{code:8193,description:"Em quad",string:"\u2001"},{code:8194,description:"En space",string:"\u2002"},{code:8195,description:"Em space",string:"\u2003"},{code:8196,description:"Three-per-em space",string:"\u2004"},{code:8197,description:"Four-per-em space",string:"\u2005"},{code:8198,description:"Six-per-em space",string:"\u2006"},{code:8199,description:"Figure space",string:"\u2007"},{code:8200,description:"Punctuation space",string:"\u2008"},{code:8201,description:"Thin space",string:"\u2009"},{code:8202,description:"Hair space",string:"\u200a"},{code:8232,description:"Line separator",string:"\u2028"},{code:8233,description:"Paragraph separator",string:"\u2029"},{code:8239,description:"Narrow no-break space",string:"\u202f"},{code:8287,description:"Medium mathematical space",string:"\u205f"},{code:12288,description:"Ideographic space",string:"\u3000"},{code:65279,description:"Byte Order Mark",string:"\ufeff"}],string="";_dereq_("for-each")(list,function reducer(item){string+=item.string}),module.exports={list:list,string:string}},{"for-each":2}],2:[function(_dereq_,module,exports){function forEachArray(array,iterator,context){for(var i=0,len=array.length;i<len;i++)hasOwnProperty.call(array,i)&&iterator.call(context,array[i],i,array)}function forEachString(string,iterator,context){for(var i=0,len=string.length;i<len;i++)iterator.call(context,string.charAt(i),i,string)}function forEachObject(object,iterator,context){for(var k in object)hasOwnProperty.call(object,k)&&iterator.call(context,object[k],k,object)}var isFunction=_dereq_("is-function");module.exports=function forEach(list,iterator,context){if(!isFunction(iterator))throw new TypeError("iterator must be a function");arguments.length<3&&(context=this),"[object Array]"===toString.call(list)?forEachArray(list,iterator,context):"string"==typeof list?forEachString(list,iterator,context):forEachObject(list,iterator,context)};var toString=Object.prototype.toString,hasOwnProperty=Object.prototype.hasOwnProperty},{"is-function":3}],3:[function(_dereq_,module,exports){module.exports=function isFunction(fn){var string=toString.call(fn);return"[object Function]"===string||"function"==typeof fn&&"[object RegExp]"!==string||"undefined"!=typeof window&&(fn===window.setTimeout||fn===window.alert||fn===window.confirm||fn===window.prompt)};var toString=Object.prototype.toString},{}]},{},[1])(1)});
{
"name": "white-space-x",
"version": "1.2.0",
"version": "2.0.0",
"description": "List of ECMAScript5 white space characters.",

@@ -33,36 +33,57 @@ "homepage": "https://github.com/Xotic750/white-space-x",

"dependencies": {
"define-properties-x": "^1.3.0",
"foreach": "^2.0.5"
"for-each": "^0.3.2"
},
"devDependencies": {
"@ljharb/eslint-config": "^11.0.0",
"browserify": "^14.1.0",
"@xotic750/eslint-config-standard-x": "^2.2.1",
"browserify": "^14.4.0",
"browserify-derequire": "^0.9.4",
"cross-env": "^5.0.1",
"es5-shim": "^4.5.9",
"es6-shim": "^0.35.3",
"es7-shim": "^6.0.0",
"eslint": "^3.18.0",
"eslint-plugin-import": "^2.2.0",
"eslint": "^4.2.0",
"eslint-plugin-compat": "^1.0.4",
"eslint-plugin-css-modules": "^2.7.2",
"eslint-plugin-eslint-comments": "^1.0.2",
"eslint-plugin-jsdoc": "^3.1.1",
"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": "^3.0.0",
"json3": "^3.3.2",
"make-jasmine-spec-runner-html": "^1.1.0",
"make-jasmine-spec-runner-html": "^1.3.0",
"ncp": "^2.0.0",
"nodemon": "^1.11.0",
"nsp": "^2.6.3",
"replace-x": "^1.1.1",
"uglify-js": "^2.8.18"
"parallelshell": "^3.0.1",
"replace-x": "^1.5.0",
"rimraf": "^2.6.1",
"serve": "^6.0.2",
"uglify-js": "^3.0.24"
},
"scripts": {
"build": "npm run build:setver && npm run security && npm run eslint && npm run browserify && npm run uglify && npm run docs && npm run build:jasmine && npm test",
"build:jasmine": "make-jasmine-spec-runner-html",
"build:setver": "PKG_VER=$(node -p -e \"require('./package.json').version\") && replace-x \" @version .*\" \" @version ${PKG_VER}\" index.js",
"build:watch": "nodemon --watch index.js --watch package.json --exec 'npm run build'",
"docs": "jsdoc2md --name-format --example-lang js index.js > README.md",
"eslint": "eslint *.js tests/spec/*.js",
"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/",
"test:watch": "nodemon --watch tests/spec/test.js --exec 'npm test'",
"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 --compress --keep-fnames --mangle --beautify ascii_only=true,beautify=false --source-map lib/white-space-x.map"
"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"
}
}

@@ -1,27 +0,27 @@

<a name="module_white-space-x"></a>
## white-space-x
<a href="https://travis-ci.org/Xotic750/white-space-x"
title="Travis status">
<img src="https://travis-ci.org/Xotic750/white-space-x.svg?branch=master"
alt="Travis status" height="18">
title="Travis status">
<img
src="https://travis-ci.org/Xotic750/white-space-x.svg?branch=master"
alt="Travis status" height="18"/>
</a>
<a href="https://david-dm.org/Xotic750/white-space-x"
title="Dependency status">
title="Dependency status">
<img src="https://david-dm.org/Xotic750/white-space-x.svg"
alt="Dependency status" height="18"/>
alt="Dependency status" height="18"/>
</a>
<a href="https://david-dm.org/Xotic750/white-space-x#info=devDependencies"
title="devDependency status">
title="devDependency status">
<img src="https://david-dm.org/Xotic750/white-space-x/dev-status.svg"
alt="devDependency status" height="18"/>
alt="devDependency status" height="18"/>
</a>
<a href="https://badge.fury.io/js/white-space-x" title="npm version">
<img src="https://badge.fury.io/js/white-space-x.svg"
alt="npm version" height="18">
alt="npm version" height="18"/>
</a>
<a name="module_white-space-x"></a>
## white-space-x
List of ECMAScript5 white space characters.
**Version**: 1.2.0
**Version**: 2.0.0
**Author**: Xotic750 <Xotic750@gmail.com>

@@ -32,67 +32,58 @@ **License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

* [white-space-x](#module_white-space-x)
* [`~whiteSpaces`](#module_white-space-x..whiteSpaces) : <code>Array.&lt;number&gt;</code>
* [`~ws`](#module_white-space-x..ws) : <code>string</code>
* [`~list`](#module_white-space-x..list) : <code>Array.&lt;Object&gt;</code>
* [`~string`](#module_white-space-x..string) : <code>string</code>
<a name="module_white-space-x..whiteSpaces"></a>
<a name="module_white-space-x..list"></a>
### `white-space-x~whiteSpaces` : <code>Array.&lt;number&gt;</code>
An array of the whitespace char codes.
### `white-space-x~list` : <code>Array.&lt;Object&gt;</code>
An array of the ES5 whitespace char codes, string, and their descriptions.
**Kind**: inner property of <code>[white-space-x](#module_white-space-x)</code>
**Properties**
| Name | Type | Description |
| --- | --- | --- |
| 0 | <code>number</code> | 0x0009 // Tab |
| 1 | <code>number</code> | 0x000a // Line Feed |
| 2 | <code>number</code> | 0x000b // Vertical Tab |
| 3 | <code>number</code> | 0x000c // Form Feed |
| 4 | <code>number</code> | 0x000d // Carriage Return |
| 5 | <code>number</code> | 0x0020 // Space |
| 6 | <code>number</code> | 0x00a0 // No-break space |
| 7 | <code>number</code> | 0x1680 // Ogham space mark |
| 8 | <code>number</code> | 0x180e // Mongolian vowel separator |
| 9 | <code>number</code> | 0x2000 // En quad |
| 10 | <code>number</code> | 0x2001 // Em quad |
| 11 | <code>number</code> | 0x2002 // En space |
| 12 | <code>number</code> | 0x2003 // Em space |
| 13 | <code>number</code> | 0x2004 // Three-per-em space |
| 14 | <code>number</code> | 0x2005 // Four-per-em space |
| 15 | <code>number</code> | 0x2006 // Six-per-em space |
| 16 | <code>number</code> | 0x2007 // Figure space |
| 17 | <code>number</code> | 0x2008 // Punctuation space |
| 18 | <code>number</code> | 0x2009 // Thin space |
| 19 | <code>number</code> | 0x200a // Hair space |
| 20 | <code>number</code> | 0x2028 // Line separator |
| 21 | <code>number</code> | 0x2029 // Paragraph separator |
| 22 | <code>number</code> | 0x202f // Narrow no-break space |
| 23 | <code>number</code> | 0x205f // Medium mathematical space |
| 24 | <code>number</code> | 0x3000 // Ideographic space |
| 25 | <code>number</code> | 0xfeff // Byte Order Mark |
**Kind**: inner property of [<code>white-space-x</code>](#module_white-space-x)
**Example**
```js
var lib = require('white-space-x');
var count = 0x110000;
var nws = ''; // A string of all the non-whitepaces
do {
count -= 1;
if (lib.whiteSpaces.indexOf(count) < 0) {
nws = String.fromCodePoint(count) + nws;
}
} while (count);
var whiteSpace = require('white-space-x');
whiteSpaces.list.foreach(function (item) {
console.log(lib.description, item.code, item.string);
});
```
<a name="module_white-space-x..ws"></a>
<a name="module_white-space-x..string"></a>
### `white-space-x~ws` : <code>string</code>
A string of the whitespace characters.
### `white-space-x~string` : <code>string</code>
A string of the ES5 whitespace characters.
**Kind**: inner property of <code>[white-space-x](#module_white-space-x)</code>
**Default**: <code>&quot;\\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&quot;</code>
**Kind**: inner property of [<code>white-space-x</code>](#module_white-space-x)
**Example**
```js
var lib = require('white-space-x');
var ws = '\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';
var re1 = new RegExp('^[' + lib.ws + ']+$)');
var whiteSpace = require('white-space-x');
var 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'
];
var ws = characters.join('');
var re1 = new RegExp('^[' + whiteSpace.string + ']+$)');
re1.test(ws); // true
```

@@ -1,124 +0,220 @@

/* jslint maxlen:80, es6:true, white:true */
'use strict';
/* jshint bitwise:true, camelcase:true, curly:true, eqeqeq:true, forin:true,
freeze:true, futurehostile:true, latedef:true, newcap:true, nocomma:true,
nonbsp:true, singleGroups:true, strict:true, undef:true, unused:true,
es3:false, esnext:true, plusplus:true, maxparams:1, maxdepth:2,
maxstatements:12, maxcomplexity:4 */
var whiteSpace;
if (typeof module === 'object' && module.exports) {
require('es5-shim');
require('es5-shim/es5-sham');
if (typeof JSON === 'undefined') {
JSON = {};
}
require('json3').runInContext(null, JSON);
require('es6-shim');
var es7 = require('es7-shim');
Object.keys(es7).forEach(function (key) {
var obj = es7[key];
if (typeof obj.shim === 'function') {
obj.shim();
}
});
whiteSpace = require('../../index.js');
} else {
whiteSpace = returnExports;
}
/* eslint strict: 1, max-lines: 1, symbol-description: 1, max-nested-callbacks: 1,
max-statements: 1 */
/* global JSON:true, expect, module, require, describe, it, returnExports */
;(function () { // eslint-disable-line no-extra-semi
'use strict';
var lib;
if (typeof module === 'object' && module.exports) {
require('es5-shim');
require('es5-shim/es5-sham');
if (typeof JSON === 'undefined') {
JSON = {};
}
require('json3').runInContext(null, JSON);
require('es6-shim');
var es7 = require('es7-shim');
Object.keys(es7).forEach(function (key) {
var obj = es7[key];
if (typeof obj.shim === 'function') {
obj.shim();
}
});
lib = require('../../index.js');
} else {
lib = returnExports;
var list = [
{
code: 0x0009,
description: 'Tab',
string: '\u0009'
},
{
code: 0x000a,
description: 'Line Feed',
string: '\u000a'
},
{
code: 0x000b,
description: 'Vertical Tab',
string: '\u000b'
},
{
code: 0x000c,
description: 'Form Feed',
string: '\u000c'
},
{
code: 0x000d,
description: 'Carriage Return',
string: '\u000d'
},
{
code: 0x0020,
description: 'Space',
string: '\u0020'
},
/*
{
code: 0x0085,
description: 'Next line - Not ES5 whitespace',
string: '\u0085'
}
*/
{
code: 0x00a0,
description: 'No-break space',
string: '\u00a0'
},
{
code: 0x1680,
description: 'Ogham space mark',
string: '\u1680'
},
{
code: 0x180e,
description: 'Mongolian vowel separator',
string: '\u180e'
},
{
code: 0x2000,
description: 'En quad',
string: '\u2000'
},
{
code: 0x2001,
description: 'Em quad',
string: '\u2001'
},
{
code: 0x2002,
description: 'En space',
string: '\u2002'
},
{
code: 0x2003,
description: 'Em space',
string: '\u2003'
},
{
code: 0x2004,
description: 'Three-per-em space',
string: '\u2004'
},
{
code: 0x2005,
description: 'Four-per-em space',
string: '\u2005'
},
{
code: 0x2006,
description: 'Six-per-em space',
string: '\u2006'
},
{
code: 0x2007,
description: 'Figure space',
string: '\u2007'
},
{
code: 0x2008,
description: 'Punctuation space',
string: '\u2008'
},
{
code: 0x2009,
description: 'Thin space',
string: '\u2009'
},
{
code: 0x200a,
description: 'Hair space',
string: '\u200a'
},
/*
{
code: 0x200b,
description: 'Zero width space - Not ES5 whitespace',
string: '\u200b'
},
*/
{
code: 0x2028,
description: 'Line separator',
string: '\u2028'
},
{
code: 0x2029,
description: 'Paragraph separator',
string: '\u2029'
},
{
code: 0x202f,
description: 'Narrow no-break space',
string: '\u202f'
},
{
code: 0x205f,
description: 'Medium mathematical space',
string: '\u205f'
},
{
code: 0x3000,
description: 'Ideographic space',
string: '\u3000'
},
{
code: 0xfeff,
description: 'Byte Order Mark',
string: '\ufeff'
}
];
var whiteSpaces = [
0x0009, // Tab
0x000a, // Line Feed
0x000b, // Vertical Tab
0x000c, // Form Feed
0x000d, // Carriage Return
0x0020, // Space
// 0x0085, // Next line - Not ES5 whitespace
0x00a0, // No-break space
0x1680, // Ogham space mark
0x180e, // Mongolian vowel separator
0x2000, // En quad
0x2001, // Em quad
0x2002, // En space
0x2003, // Em space
0x2004, // Three-per-em space
0x2005, // Four-per-em space
0x2006, // Six-per-em space
0x2007, // Figure space
0x2008, // Punctuation space
0x2009, // Thin space
0x200a, // Hair space
// 0x200b, // Zero width space - Not ES5 whitespace
0x2028, // Line separator
0x2029, // Paragraph separator
0x202f, // Narrow no-break space
0x205f, // Medium mathematical space
0x3000, // Ideographic space
0xfeff // Byte Order Mark
];
var string = list.reduce(function (acc, item) {
return acc + String.fromCharCode(item.code);
}, '');
var ws = whiteSpaces.reduce(function reducer(acc, item) {
return acc + String.fromCharCode(item);
}, '');
var nonWhiteSpaceStr = new Array(0xfeff).fill().reduce(function (str, u, index) {
var includes = function _includes(item) {
return item.code === index;
};
var nws = (function () {
var count = 0x110000,
str = '';
do {
count -= 1;
if (whiteSpaces.indexOf(count) < 0) {
str = String.fromCodePoint(count) + str;
}
} while (count);
return str;
}());
return list.some(includes) ? str : str + String.fromCodePoint(index);
}, '');
describe('Basic tests', function () {
it('should be equal', function () {
expect(lib.whiteSpaces).toEqual(whiteSpaces);
expect(lib.ws).toBe(ws);
});
describe('Basic tests', function () {
it('should be equal', function () {
expect(whiteSpace.list).toEqual(list);
expect(whiteSpace.string).toBe(string);
});
it('should be equal', function () {
var re = new RegExp('[' + lib.ws + ']', 'g');
expect((ws + nws).replace(re, '')).toEqual(nws);
expect((nws + ws).replace(re, '')).toEqual(nws);
});
it('should be equal', function () {
var re = new RegExp('[' + whiteSpace.string + ']', 'g');
expect((string + nonWhiteSpaceStr).replace(re, '')).toBe(nonWhiteSpaceStr);
expect((nonWhiteSpaceStr + string).replace(re, '')).toBe(nonWhiteSpaceStr);
});
it('should be equal', function () {
var re = new RegExp('[^' + lib.ws + ']', 'g');
expect((ws + nws).replace(re, '')).toEqual(ws);
expect((nws + ws).replace(re, '')).toEqual(ws);
});
it('should be equal', function () {
var re = new RegExp('[^' + whiteSpace.string + ']', 'g');
expect((string + nonWhiteSpaceStr).replace(re, '')).toBe(string);
expect((nonWhiteSpaceStr + string).replace(re, '')).toBe(string);
});
it('should be `true`', function () {
var re = new RegExp('^[' + lib.ws + ']+$');
expect(re.test(ws)).toBe(true);
});
it('should be `true`', function () {
var re = new RegExp('^[' + whiteSpace.string + ']+$');
expect(re.test(string)).toBe(true);
});
it('should be `false`', function () {
var re = new RegExp('[' + lib.ws + ']');
expect(re.test(nws)).toBe(false);
});
it('should be `false`', function () {
var re = new RegExp('[' + whiteSpace.string + ']');
expect(re.test(nonWhiteSpaceStr)).toBe(false);
});
it('should be `true`', function () {
var re = new RegExp('^[^' + lib.ws + ']+$');
expect(re.test(nws)).toBe(true);
});
it('should be `true`', function () {
var re = new RegExp('^[^' + whiteSpace.string + ']+$');
expect(re.test(nonWhiteSpaceStr)).toBe(true);
});
it('should be `false`', function () {
var re = new RegExp('[^' + lib.ws + ']');
expect(re.test(ws)).toBe(false);
});
it('should be `false`', function () {
var re = new RegExp('[^' + whiteSpace.string + ']');
expect(re.test(string)).toBe(false);
});
}());
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc