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

is-array-buffer-x

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-array-buffer-x - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

index.js
/**
* @file Detect whether or not an object is an ArrayBuffer.
* @version 1.3.0
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -5,0 +5,0 @@ * @copyright Xotic750

(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 Detect whether or not an object is an ArrayBuffer.
* @version 1.3.0
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -67,3 +67,3 @@ * @copyright Xotic750

},{"has-to-string-tag-x":3,"is-object-like-x":5,"to-string-tag-x":8}],2:[function(_dereq_,module,exports){
},{"has-to-string-tag-x":3,"is-object-like-x":5,"to-string-tag-x":12}],2:[function(_dereq_,module,exports){
/**

@@ -112,3 +112,3 @@ * @file Tests if ES6 Symbol is supported.

* @file Determine whether a given value is a function object.
* @version 1.4.0
* @version 3.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -126,2 +126,4 @@ * @copyright Xotic750

var isPrimitive = _dereq_('is-primitive');
var normalise = _dereq_('normalize-space-x');
var deComment = _dereq_('replace-comments-x');
var funcTag = '[object Function]';

@@ -131,13 +133,18 @@ var genTag = '[object GeneratorFunction]';

var constructorRegex = /^\s*class /;
var hasNativeClass = true;
try {
// eslint-disable-next-line no-new-func
Function('"use strict"; return class My {};')();
} catch (ignore) {
hasNativeClass = false;
}
var ctrRx = /^class /;
var isES6ClassFn = function isES6ClassFunc(value) {
try {
var fnStr = fToString.call(value);
var singleStripped = fnStr.replace(/\/\/.*\n/g, '');
var multiStripped = singleStripped.replace(/\/\*[.\s\S]*\*\//g, '');
var spaceStripped = multiStripped.replace(/\n/mg, ' ').replace(/ {2}/g, ' ');
return constructorRegex.test(spaceStripped);
return ctrRx.test(normalise(deComment(fToString.call(value), ' ')));
} catch (ignore) {}
return false; // not a function
// not a function
return false;
};

@@ -150,8 +157,10 @@

* @param {*} value - The value to check.
* @param {boolean} allowClass - Whether to filter ES6 classes.
* @returns {boolean} Returns `true` if `value` is correctly classified,
* else `false`.
*/
var tryFuncToString = function funcToString(value) {
var tryFuncToString = function funcToString(value, allowClass) {
try {
if (isES6ClassFn(value)) {
if (hasNativeClass && allowClass === false && isES6ClassFn(value)) {
return false;

@@ -171,2 +180,3 @@ }

* @param {*} value - The value to check.
* @param {boolean} [allowClass=false] - Whether to filter ES6 classes.
* @returns {boolean} Returns `true` if `value` is correctly classified,

@@ -186,4 +196,5 @@ * else `false`.

* isFunction(function test2(a, b) {}); // true
- isFunction(async function test3() {}); // true
* isFunction(async function test3() {}); // true
* isFunction(class Test {}); // false
* isFunction(class Test {}, true); // true
* isFunction((x, y) => {return this;}); // true

@@ -196,7 +207,8 @@ */

var allowClass = arguments.length > 0 ? Boolean(arguments[1]) : false;
if (hasToStringTag) {
return tryFuncToString(value);
return tryFuncToString(value, allowClass);
}
if (isES6ClassFn(value)) {
if (hasNativeClass && allowClass === false && isES6ClassFn(value)) {
return false;

@@ -209,6 +221,6 @@ }

},{"has-to-string-tag-x":3,"is-primitive":6,"to-string-tag-x":8}],5:[function(_dereq_,module,exports){
},{"has-to-string-tag-x":3,"is-primitive":6,"normalize-space-x":10,"replace-comments-x":11,"to-string-tag-x":12}],5:[function(_dereq_,module,exports){
/**
* @file Determine if a value is object like.
* @version 1.3.0
* @version 1.5.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -247,3 +259,3 @@ * @copyright Xotic750

module.exports = function isObjectLike(value) {
return isPrimitive(value) === false && isFunction(value) === false;
return isPrimitive(value) === false && isFunction(value, true) === false;
};

@@ -267,2 +279,53 @@

},{}],7:[function(_dereq_,module,exports){
'use strict';
var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
try {
strValue.call(value);
return true;
} catch (e) {
return false;
}
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
module.exports = function isString(value) {
if (typeof value === 'string') { return true; }
if (typeof value !== 'object') { return false; }
return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};
},{}],8:[function(_dereq_,module,exports){
'use strict';
var toStr = Object.prototype.toString;
var hasSymbols = typeof Symbol === 'function' && typeof Symbol() === 'symbol';
if (hasSymbols) {
var symToStr = Symbol.prototype.toString;
var symStringRegex = /^Symbol\(.*\)$/;
var isSymbolObject = function isSymbolObject(value) {
if (typeof value.valueOf() !== 'symbol') { return false; }
return symStringRegex.test(symToStr.call(value));
};
module.exports = function isSymbol(value) {
if (typeof value === 'symbol') { return true; }
if (toStr.call(value) !== '[object Symbol]') { return false; }
try {
return isSymbolObject(value);
} catch (e) {
return false;
}
};
} else {
module.exports = function isSymbol(value) {
// this environment does not support Symbols.
return false;
};
}
},{}],9:[function(_dereq_,module,exports){
/**

@@ -299,4 +362,69 @@ * lodash 3.0.0 (Custom Build) <https://lodash.com/>

},{}],8:[function(_dereq_,module,exports){
},{}],10:[function(_dereq_,module,exports){
/**
* @file Trims and replaces sequences of whitespace characters by a single space.
* @version 1.3.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module normalize-space-x
*/
'use strict';
var trim = _dereq_('trim-x');
var reNormalize = new RegExp('[' + _dereq_('white-space-x').string + ']+', 'g');
/**
* This method strips leading and trailing white-space from a string,
* replaces sequences of whitespace characters by a single space,
* and returns the resulting string.
*
* @param {string} string - The string to be normalized.
* @returns {string} The normalized string.
* @example
* var normalizeSpace = require('normalize-space-x');
*
* normalizeSpace(' \t\na \t\nb \t\n') === 'a b'; // true
*/
module.exports = function normalizeSpace(string) {
return trim(string).replace(reNormalize, ' ');
};
},{"trim-x":16,"white-space-x":18}],11:[function(_dereq_,module,exports){
/**
* @file Replace the comments in a string.
* @version 1.0.1
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module replace-comments-x
*/
'use strict';
var isString = _dereq_('is-string');
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
var $replaceComments = function replaceComments(string) {
var replacement = arguments.length > 1 && isString(arguments[1]) ? arguments[1] : '';
return isString(string) ? string.replace(STRIP_COMMENTS, replacement) : '';
};
/**
* This method replaces comments in a string.
*
* @param {string} string - The string to be stripped.
* @param {string} [replacement] - The string to be used as a replacement.
* @returns {string} The new string with the comments replaced.
* @example
* var replaceComments = require('replace-comments-x');
*
* replaceComments(test;/* test * /, ''), // 'test;'
* replaceComments(test; // test, ''), // 'test;'
*/
module.exports = $replaceComments;
},{"is-string":7}],12:[function(_dereq_,module,exports){
/**
* @file Get an object's ES6 @@toStringTag.

@@ -341,4 +469,131 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}

},{"lodash.isnull":7,"validate.io-undefined":9}],9:[function(_dereq_,module,exports){
},{"lodash.isnull":9,"validate.io-undefined":17}],13:[function(_dereq_,module,exports){
/**
* @file ES6-compliant shim for ToString.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tostring|7.1.12 ToString ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-x
*/
'use strict';
var isSymbol = _dereq_('is-symbol');
/**
* The abstract operation ToString converts argument to a value of type String.
*
* @param {*} value - The value to convert to a string.
* @throws {TypeError} If `value` is a Symbol.
* @returns {string} The converted value.
* @example
* var $toString = require('to-string-x');
*
* $toString(); // 'undefined'
* $toString(null); // 'null'
* $toString('abc'); // 'abc'
* $toString(true); // 'true'
* $toString(Symbol('foo')); // TypeError
* $toString(Symbol.iterator); // TypeError
* $toString(Object(Symbol.iterator)); // TypeError
*/
module.exports = function ToString(value) {
if (isSymbol(value)) {
throw new TypeError('Cannot convert a Symbol value to a string');
}
return String(value);
};
},{"is-symbol":8}],14:[function(_dereq_,module,exports){
/**
* @file This method removes whitespace from the left end of a string.
* @version 1.3.3
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-left-x
*/
'use strict';
var $toString = _dereq_('to-string-x');
var reLeft = new RegExp('^[' + _dereq_('white-space-x').string + ']+');
/**
* This method removes whitespace from the left end of a string.
*
* @param {string} string - The string to trim the left end whitespace from.
* @returns {undefined|string} The left trimmed string.
* @example
* var trimLeft = require('trim-left-x');
*
* trimLeft(' \t\na \t\n') === 'a \t\n'; // true
*/
module.exports = function trimLeft(string) {
return $toString(string).replace(reLeft, '');
};
},{"to-string-x":13,"white-space-x":18}],15:[function(_dereq_,module,exports){
/**
* @file This method removes whitespace from the right end of a string.
* @version 1.3.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-right-x
*/
'use strict';
var $toString = _dereq_('to-string-x');
var reRight = new RegExp('[' + _dereq_('white-space-x').string + ']+$');
/**
* This method removes whitespace from the right end of a string.
*
* @param {string} string - The string to trim the right end whitespace from.
* @returns {undefined|string} The right trimmed string.
* @example
* var trimRight = require('trim-right-x');
*
* trimRight(' \t\na \t\n') === ' \t\na'; // true
*/
module.exports = function trimRight(string) {
return $toString(string).replace(reRight, '');
};
},{"to-string-x":13,"white-space-x":18}],16:[function(_dereq_,module,exports){
/**
* @file This method removes whitespace from the left and right end of a string.
* @version 1.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-x
*/
'use strict';
var trimLeft = _dereq_('trim-left-x');
var trimRight = _dereq_('trim-right-x');
/**
* This method removes whitespace from the left and right end of a string.
*
* @param {string} string - The string to trim the whitespace from.
* @returns {undefined|string} The trimmed string.
* @example
* var trim = require('trim-x');
*
* trim(' \t\na \t\n') === 'a'; // true
*/
module.exports = function trim(string) {
return trimLeft(trimRight(string));
};
},{"trim-left-x":14,"trim-right-x":15}],17:[function(_dereq_,module,exports){
/**
*

@@ -389,3 +644,223 @@ * VALIDATE: undefined

},{}],18:[function(_dereq_,module,exports){
/**
* @file List of ECMAScript5 white space characters.
* @version 2.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module white-space-x
*/
'use strict';
/**
* 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'
}
];
var string = '';
var length = list.length;
for (var i = 0; i < length; i += 1) {
string += list[i].string;
}
/**
* 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
};
},{}]},{},[1])(1)
});
!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 Detect whether or not an object is an ArrayBuffer.
* @version 1.3.0
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -9,3 +9,3 @@ * @copyright Xotic750

*/
"use strict";var toStringTag,aBufTag,bLength,isObjectLike=_dereq_("is-object-like-x"),hasABuf="function"==typeof ArrayBuffer;if(hasABuf){if(_dereq_("has-to-string-tag-x"))try{bLength=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,bLength="number"==typeof bLength.call(new ArrayBuffer(4))&&bLength}catch(ignore){}!1===Boolean(bLength)&&(toStringTag=_dereq_("to-string-tag-x"),aBufTag="[object ArrayBuffer]")}module.exports=function isArrayBuffer(object){if(!1===hasABuf||!1===isObjectLike(object))return!1;if(!1===Boolean(bLength))return toStringTag(object)===aBufTag;try{return"number"==typeof bLength.call(object)}catch(ignore){}return!1}},{"has-to-string-tag-x":3,"is-object-like-x":5,"to-string-tag-x":8}],2:[function(_dereq_,module,exports){/**
"use strict";var toStringTag,aBufTag,bLength,isObjectLike=_dereq_("is-object-like-x"),hasABuf="function"==typeof ArrayBuffer;if(hasABuf){if(_dereq_("has-to-string-tag-x"))try{bLength=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,bLength="number"==typeof bLength.call(new ArrayBuffer(4))&&bLength}catch(ignore){}!1===Boolean(bLength)&&(toStringTag=_dereq_("to-string-tag-x"),aBufTag="[object ArrayBuffer]")}module.exports=function isArrayBuffer(object){if(!1===hasABuf||!1===isObjectLike(object))return!1;if(!1===Boolean(bLength))return toStringTag(object)===aBufTag;try{return"number"==typeof bLength.call(object)}catch(ignore){}return!1}},{"has-to-string-tag-x":3,"is-object-like-x":5,"to-string-tag-x":12}],2:[function(_dereq_,module,exports){/**
* @file Tests if ES6 Symbol is supported.

@@ -29,3 +29,3 @@ * @version 1.4.0

* @file Determine whether a given value is a function object.
* @version 1.4.0
* @version 3.1.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -36,5 +36,5 @@ * @copyright Xotic750

*/
"use strict";var fToString=Function.prototype.toString,toStringTag=_dereq_("to-string-tag-x"),hasToStringTag=_dereq_("has-to-string-tag-x"),isPrimitive=_dereq_("is-primitive"),constructorRegex=/^\s*class /,isES6ClassFn=function isES6ClassFunc(value){try{var spaceStripped=fToString.call(value).replace(/\/\/.*\n/g,"").replace(/\/\*[.\s\S]*\*\//g,"").replace(/\n/gm," ").replace(/ {2}/g," ");return constructorRegex.test(spaceStripped)}catch(ignore){}return!1},tryFuncToString=function funcToString(value){try{return!isES6ClassFn(value)&&(fToString.call(value),!0)}catch(ignore){}return!1};module.exports=function isFunction(value){if(isPrimitive(value))return!1;if(hasToStringTag)return tryFuncToString(value);if(isES6ClassFn(value))return!1;var strTag=toStringTag(value);return"[object Function]"===strTag||"[object GeneratorFunction]"===strTag||"[object AsyncFunction]"===strTag}},{"has-to-string-tag-x":3,"is-primitive":6,"to-string-tag-x":8}],5:[function(_dereq_,module,exports){/**
"use strict";var fToString=Function.prototype.toString,toStringTag=_dereq_("to-string-tag-x"),hasToStringTag=_dereq_("has-to-string-tag-x"),isPrimitive=_dereq_("is-primitive"),normalise=_dereq_("normalize-space-x"),deComment=_dereq_("replace-comments-x"),hasNativeClass=!0;try{Function('"use strict"; return class My {};')()}catch(ignore){hasNativeClass=!1}var ctrRx=/^class /,isES6ClassFn=function isES6ClassFunc(value){try{return ctrRx.test(normalise(deComment(fToString.call(value)," ")))}catch(ignore){}return!1},tryFuncToString=function funcToString(value,allowClass){try{return(!hasNativeClass||!1!==allowClass||!isES6ClassFn(value))&&(fToString.call(value),!0)}catch(ignore){}return!1};module.exports=function isFunction(value){if(isPrimitive(value))return!1;var allowClass=arguments.length>0&&Boolean(arguments[1]);if(hasToStringTag)return tryFuncToString(value,allowClass);if(hasNativeClass&&!1===allowClass&&isES6ClassFn(value))return!1;var strTag=toStringTag(value);return"[object Function]"===strTag||"[object GeneratorFunction]"===strTag||"[object AsyncFunction]"===strTag}},{"has-to-string-tag-x":3,"is-primitive":6,"normalize-space-x":10,"replace-comments-x":11,"to-string-tag-x":12}],5:[function(_dereq_,module,exports){/**
* @file Determine if a value is object like.
* @version 1.3.0
* @version 1.5.0
* @author Xotic750 <Xotic750@gmail.com>

@@ -45,3 +45,19 @@ * @copyright Xotic750

*/
"use strict";var isFunction=_dereq_("is-function-x"),isPrimitive=_dereq_("is-primitive");module.exports=function isObjectLike(value){return!1===isPrimitive(value)&&!1===isFunction(value)}},{"is-function-x":4,"is-primitive":6}],6:[function(_dereq_,module,exports){"use strict";module.exports=function isPrimitive(value){return null==value||"function"!=typeof value&&"object"!=typeof value}},{}],7:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],8:[function(_dereq_,module,exports){/**
"use strict";var isFunction=_dereq_("is-function-x"),isPrimitive=_dereq_("is-primitive");module.exports=function isObjectLike(value){return!1===isPrimitive(value)&&!1===isFunction(value,!0)}},{"is-function-x":4,"is-primitive":6}],6:[function(_dereq_,module,exports){"use strict";module.exports=function isPrimitive(value){return null==value||"function"!=typeof value&&"object"!=typeof value}},{}],7:[function(_dereq_,module,exports){"use strict";var strValue=String.prototype.valueOf,tryStringObject=function tryStringObject(value){try{return strValue.call(value),!0}catch(e){return!1}},toStr=Object.prototype.toString,hasToStringTag="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;module.exports=function isString(value){return"string"==typeof value||"object"==typeof value&&(hasToStringTag?tryStringObject(value):"[object String]"===toStr.call(value))}},{}],8:[function(_dereq_,module,exports){"use strict";var toStr=Object.prototype.toString;if("function"==typeof Symbol&&"symbol"==typeof Symbol()){var symToStr=Symbol.prototype.toString,symStringRegex=/^Symbol\(.*\)$/,isSymbolObject=function isSymbolObject(value){return"symbol"==typeof value.valueOf()&&symStringRegex.test(symToStr.call(value))};module.exports=function isSymbol(value){if("symbol"==typeof value)return!0;if("[object Symbol]"!==toStr.call(value))return!1;try{return isSymbolObject(value)}catch(e){return!1}}}else module.exports=function isSymbol(value){return!1}},{}],9:[function(_dereq_,module,exports){module.exports=function isNull(value){return null===value}},{}],10:[function(_dereq_,module,exports){/**
* @file Trims and replaces sequences of whitespace characters by a single space.
* @version 1.3.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module normalize-space-x
*/
"use strict";var trim=_dereq_("trim-x"),reNormalize=new RegExp("["+_dereq_("white-space-x").string+"]+","g");module.exports=function normalizeSpace(string){return trim(string).replace(reNormalize," ")}},{"trim-x":16,"white-space-x":18}],11:[function(_dereq_,module,exports){/**
* @file Replace the comments in a string.
* @version 1.0.1
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module replace-comments-x
*/
"use strict";var isString=_dereq_("is-string"),STRIP_COMMENTS=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;module.exports=function replaceComments(string){var replacement=arguments.length>1&&isString(arguments[1])?arguments[1]:"";return isString(string)?string.replace(STRIP_COMMENTS,replacement):""}},{"is-string":7}],12:[function(_dereq_,module,exports){/**
* @file Get an object's ES6 @@toStringTag.

@@ -55,2 +71,43 @@ * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}

*/
"use strict";var isNull=_dereq_("lodash.isnull"),isUndefined=_dereq_("validate.io-undefined"),toStr=Object.prototype.toString;module.exports=function toStringTag(value){return isNull(value)?"[object Null]":isUndefined(value)?"[object Undefined]":toStr.call(value)}},{"lodash.isnull":7,"validate.io-undefined":9}],9:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}]},{},[1])(1)});
"use strict";var isNull=_dereq_("lodash.isnull"),isUndefined=_dereq_("validate.io-undefined"),toStr=Object.prototype.toString;module.exports=function toStringTag(value){return isNull(value)?"[object Null]":isUndefined(value)?"[object Undefined]":toStr.call(value)}},{"lodash.isnull":9,"validate.io-undefined":17}],13:[function(_dereq_,module,exports){/**
* @file ES6-compliant shim for ToString.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-tostring|7.1.12 ToString ( argument )}
* @version 1.4.0
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module to-string-x
*/
"use strict";var isSymbol=_dereq_("is-symbol");module.exports=function ToString(value){if(isSymbol(value))throw new TypeError("Cannot convert a Symbol value to a string");return String(value)}},{"is-symbol":8}],14:[function(_dereq_,module,exports){/**
* @file This method removes whitespace from the left end of a string.
* @version 1.3.3
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-left-x
*/
"use strict";var $toString=_dereq_("to-string-x"),reLeft=new RegExp("^["+_dereq_("white-space-x").string+"]+");module.exports=function trimLeft(string){return $toString(string).replace(reLeft,"")}},{"to-string-x":13,"white-space-x":18}],15:[function(_dereq_,module,exports){/**
* @file This method removes whitespace from the right end of a string.
* @version 1.3.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-right-x
*/
"use strict";var $toString=_dereq_("to-string-x"),reRight=new RegExp("["+_dereq_("white-space-x").string+"]+$");module.exports=function trimRight(string){return $toString(string).replace(reRight,"")}},{"to-string-x":13,"white-space-x":18}],16:[function(_dereq_,module,exports){/**
* @file This method removes whitespace from the left and right end of a string.
* @version 1.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module trim-x
*/
"use strict";var trimLeft=_dereq_("trim-left-x"),trimRight=_dereq_("trim-right-x");module.exports=function trim(string){return trimLeft(trimRight(string))}},{"trim-left-x":14,"trim-right-x":15}],17:[function(_dereq_,module,exports){"use strict";module.exports=function isUndefined(value){return void 0===value}},{}],18:[function(_dereq_,module,exports){/**
* @file List of ECMAScript5 white space characters.
* @version 2.0.2
* @author Xotic750 <Xotic750@gmail.com>
* @copyright Xotic750
* @license {@link <https://opensource.org/licenses/MIT> MIT}
* @module white-space-x
*/
"use strict";for(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="",length=list.length,i=0;i<length;i+=1)string+=list[i].string;module.exports={list:list,string:string}},{}]},{},[1])(1)});
{
"name": "is-array-buffer-x",
"version": "1.3.0",
"version": "1.4.0",
"description": "Detect whether or not an object is an ArrayBuffer.",

@@ -31,5 +31,5 @@ "homepage": "https://github.com/Xotic750/is-array-buffer-x",

"dependencies": {
"is-object-like-x": "^1.3.0",
"to-string-tag-x": "^1.4.0",
"has-to-string-tag-x": "^1.4.0"
"has-to-string-tag-x": "^1.4.0",
"is-object-like-x": "^1.5.0",
"to-string-tag-x": "^1.4.0"
},

@@ -36,0 +36,0 @@ "devDependencies": {

@@ -26,3 +26,3 @@ <a href="https://travis-ci.org/Xotic750/is-array-buffer-x"

**Version**: 1.3.0
**Version**: 1.4.0
**Author**: Xotic750 <Xotic750@gmail.com>

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

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