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

define-properties-x

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

define-properties-x - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

tests/run.js

39

index.js

@@ -25,23 +25,9 @@ /**

*
* Based on the original work by Jordan Harband
* {@link https://www.npmjs.com/package/define-properties `define-properties`}.
* Define multiple non-enumerable properties at once.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
* Requires ES3 or above.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
* @see {@link https://www.npmjs.com/package/define-properties|define-properties}
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.2.0
* @version 1.2.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -53,10 +39,2 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1, id-length: 1, no-restricted-syntax: 1,

@@ -74,5 +52,4 @@ no-param-reassign: 1 */

var isUndefined = require('validate.io-undefined');
var pConcat = Array.prototype.concat;
var pForEach = Array.prototype.forEach;
var $keys = Object.keys;
var forEach = require('foreach');
var $keys = isFunction(Object.keys) ? Object.keys : require('object-keys');
var $getOwnPropertySymbols = isFunction(Object.getOwnPropertySymbols) && Object.getOwnPropertySymbols;

@@ -134,5 +111,5 @@ var $defineProperty = isFunction(Object.defineProperty) && Object.defineProperty;

if (hasSymbols && $getOwnPropertySymbols) {
props = pConcat.call(props, $getOwnPropertySymbols(map));
props = props.concat($getOwnPropertySymbols(map));
}
pForEach.call(props, function (name) {
forEach(props, function (name) {
var predicate = preds[name];

@@ -139,0 +116,0 @@ property(

@@ -26,23 +26,9 @@ (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){

*
* Based on the original work by Jordan Harband
* {@link https://www.npmjs.com/package/define-properties `define-properties`}.
* Define multiple non-enumerable properties at once.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
* Requires ES3 or above.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
* @see {@link https://www.npmjs.com/package/define-properties|define-properties}
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.2.0
* @version 1.2.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -54,10 +40,2 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1, id-length: 1, no-restricted-syntax: 1,

@@ -75,5 +53,4 @@ no-param-reassign: 1 */

var isUndefined = _dereq_('validate.io-undefined');
var pConcat = Array.prototype.concat;
var pForEach = Array.prototype.forEach;
var $keys = Object.keys;
var forEach = _dereq_('foreach');
var $keys = isFunction(Object.keys) ? Object.keys : _dereq_('object-keys');
var $getOwnPropertySymbols = isFunction(Object.getOwnPropertySymbols) && Object.getOwnPropertySymbols;

@@ -135,5 +112,5 @@ var $defineProperty = isFunction(Object.defineProperty) && Object.defineProperty;

if (hasSymbols && $getOwnPropertySymbols) {
props = pConcat.call(props, $getOwnPropertySymbols(map));
props = props.concat($getOwnPropertySymbols(map));
}
pForEach.call(props, function (name) {
forEach(props, function (name) {
var predicate = preds[name];

@@ -203,3 +180,27 @@ property(

},{"has-symbol-support-x":2,"is-function-x":4,"validate.io-undefined":8}],2:[function(_dereq_,module,exports){
},{"foreach":2,"has-symbol-support-x":3,"is-function-x":5,"object-keys":8,"validate.io-undefined":11}],2:[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);
}
} else {
for (var k in obj) {
if (hasOwn.call(obj, k)) {
fn.call(ctx, obj[k], k, obj);
}
}
}
};
},{}],3:[function(_dereq_,module,exports){
/**

@@ -229,23 +230,7 @@ * @file

*
* hasSymbolSupport module. Tests if `Symbol` exists and creates the correct
* type.
* Tests if `Symbol` exists and creates the correct type.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
* Requires ES3 or above.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.1.0
* @version 1.1.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -257,12 +242,4 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* eslint strict: 1, symbol-description: 1 */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1, symbol-description: 1 */
/* global module */

@@ -283,3 +260,3 @@

},{}],3:[function(_dereq_,module,exports){
},{}],4:[function(_dereq_,module,exports){
/**

@@ -309,22 +286,9 @@ * @file

*
* hasToStringTag tests if @@toStringTag is supported. `true` if supported.
* Tests if ES6 @@toStringTag is supported.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
* Requires ES3 or above.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-@@tostringtag|26.3.1 @@toStringTag}
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.1.0
* @version 1.1.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -336,12 +300,4 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* eslint strict: 1 */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1 */
/* global module */

@@ -362,3 +318,3 @@

},{"has-symbol-support-x":2}],4:[function(_dereq_,module,exports){
},{"has-symbol-support-x":3}],5:[function(_dereq_,module,exports){
/**

@@ -388,22 +344,5 @@ * @file

*
* isFunction module. Determine whether a given value is a function object.
* Determine whether a given value is a function object.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.1.0
* @version 1.1.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -415,12 +354,4 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* eslint strict: 1 */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1 */
/* global module */

@@ -438,2 +369,3 @@

var genTag = '[object GeneratorFunction]';
var asyncTag = '[object AsyncFunction]';

@@ -448,3 +380,3 @@ /**

*/
var tryFunctionObject = function (value) {
var tryFunctionObject = function funcToString(value) {
try {

@@ -486,7 +418,7 @@ fToString.call(value);

var strTag = toStringTag(value);
return strTag === funcTag || strTag === genTag;
return strTag === funcTag || strTag === genTag || strTag === asyncTag;
};
}());
},{"has-to-string-tag-x":3,"is-primitive":5,"to-string-tag-x":7}],5:[function(_dereq_,module,exports){
},{"has-to-string-tag-x":4,"is-primitive":6,"to-string-tag-x":10}],6:[function(_dereq_,module,exports){
/*!

@@ -506,3 +438,3 @@ * is-primitive <https://github.com/jonschlinkert/is-primitive>

},{}],6:[function(_dereq_,module,exports){
},{}],7:[function(_dereq_,module,exports){
/**

@@ -539,3 +471,164 @@ * lodash 3.0.0 (Custom Build) <https://lodash.com/>

},{}],7:[function(_dereq_,module,exports){
},{}],8:[function(_dereq_,module,exports){
'use strict';
// 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;
};
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":9}],9:[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;
};
},{}],10:[function(_dereq_,module,exports){
/**

@@ -563,35 +656,9 @@ * @file

*
* Get an object's @@toStringTag. Includes fixes to correct ES3 differences
* for the following.
* - undefined => '[object Undefined]'
* - null => '[object Null]'
* Get an object's ES6 @@toStringTag.
*
* No other fixes are included, so legacy `arguments` will
* give `[object Object]`, and many older native objects
* give `[object Object]`. There are also other environmental bugs
* for example `RegExp` gives `[object Function]` and `Uint8Array`
* gives `[object Object]` on certain engines. While these and more could
* be fixed, it was decided that this should be a very raw version and it
* is left to the coder to use other `is` implimentations for detection.
* It is also worth noting that as of ES6 `Symbol.toStringTag` can be set on
* an object and therefore can report any string that it wishes.
* Requires ES3 or above.
*
* <h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
* `es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
* methods that can be faithfully emulated with a legacy JavaScript engine.
* @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring|19.1.3.6 Object.prototype.toString ( )}
*
* `es5-sham.js` monkey-patches other ES5 methods as closely as possible.
* For these methods, as closely as possible to ES5 is not very close.
* Many of these shams are intended only to allow code to be written to ES5
* without causing run-time errors in older engines. In many cases,
* this means that these shams cause many ES5 methods to silently fail.
* Decide carefully whether this is what you want. Note: es5-sham.js requires
* es5-shim.js to be able to work properly.
*
* `json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
*
* `es6.shim.js` provides compatibility shims so that legacy JavaScript engines
* behave as closely as possible to ECMAScript 6 (Harmony).
*
* @version 1.1.0
* @version 1.1.1
* @author Xotic750 <Xotic750@gmail.com>

@@ -603,12 +670,4 @@ * @copyright Xotic750

/* jslint maxlen:80, es6:true, white:true */
/* eslint strict: 1 */
/* 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:1,
maxstatements:3, maxcomplexity:2 */
/* eslint strict: 1, max-statements: 1 */
/* global module */

@@ -620,3 +679,2 @@

var pToString = Object.prototype.toString;
var isNull = _dereq_('lodash.isnull');

@@ -645,7 +703,7 @@ var isUndefined = _dereq_('validate.io-undefined');

}
return pToString.call(value);
return Object.prototype.toString.call(value);
};
}());
},{"lodash.isnull":6,"validate.io-undefined":8}],8:[function(_dereq_,module,exports){
},{"lodash.isnull":7,"validate.io-undefined":11}],11:[function(_dereq_,module,exports){
/**

@@ -652,0 +710,0 @@ *

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

!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,o){function s(i,u){if(!n[i]){if(!t[i]){var f="function"==typeof require&&require;if(!u&&f)return f(i,!0);if(r)return r(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[i]={exports:{}};t[i][0].call(l.exports,function(e){var n=t[i][1][e];return s(n?n:e)},l,l.exports,e,t,n,o)}return n[i].exports}for(var r="function"==typeof require&&require,i=0;i<o.length;i++)s(o[i]);return s}({1:[function(t,e,n){!function(){"use strict";var n=t("has-symbol-support-x"),o=t("is-function-x"),r=t("validate.io-undefined"),i=Array.prototype.concat,u=Array.prototype.forEach,s=Object.keys,f=o(Object.getOwnPropertySymbols)&&Object.getOwnPropertySymbols,c=o(Object.defineProperty)&&Object.defineProperty,l=Boolean(c)&&function(){var t={};try{c(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}}(),a=function(t,e,n,o){e in t&&!o||(l?c(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},p=function(t,e,c){var l=r(c)?{}:c,p=s(e);n&&f&&(p=i.call(p,f(e))),u.call(p,function(n){var r=l[n];a(t,n,e[n],o(r)&&r())})};p(e.exports,{properties:p,property:a,supportsDescriptors:l})}()},{"has-symbol-support-x":2,"is-function-x":4,"validate.io-undefined":8}],2:[function(t,e,n){!function(){"use strict";e.exports="function"==typeof Symbol&&"symbol"==typeof Symbol()}()},{}],3:[function(t,e,n){!function(){"use strict";e.exports=t("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag}()},{"has-symbol-support-x":2}],4:[function(t,e,n){!function(){"use strict";var n=Function.prototype.toString,o=t("to-string-tag-x"),r=t("has-to-string-tag-x"),i=t("is-primitive"),u="[object Function]",s="[object GeneratorFunction]",f=function(t){try{return n.call(t),!0}catch(t){}return!1};e.exports=function isFunction(t){if(i(t))return!1;if(r)return f(t);var e=o(t);return e===u||e===s}}()},{"has-to-string-tag-x":3,"is-primitive":5,"to-string-tag-x":7}],5:[function(t,e,n){"use strict";e.exports=function isPrimitive(t){return null==t||"function"!=typeof t&&"object"!=typeof t}},{}],6:[function(t,e,n){function isNull(t){return null===t}e.exports=isNull},{}],7:[function(t,e,n){!function(){"use strict";var n=Object.prototype.toString,o=t("lodash.isnull"),r=t("validate.io-undefined"),i="[object Null]",u="[object Undefined]";e.exports=function toStringTag(t){return o(t)?i:r(t)?u:n.call(t)}}()},{"lodash.isnull":6,"validate.io-undefined":8}],8:[function(t,e,n){"use strict";function isUndefined(t){return void 0===t}e.exports=isUndefined},{}]},{},[1])(1)});
!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?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("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:2,"has-symbol-support-x":3,"is-function-x":5,"object-keys":8,"validate.io-undefined":11}],2:[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)}},{}],3:[function(t,e,n){!function(){"use strict";e.exports="function"==typeof Symbol&&"symbol"==typeof Symbol()}()},{}],4:[function(t,e,n){!function(){"use strict";e.exports=t("has-symbol-support-x")&&"symbol"==typeof Symbol.toStringTag}()},{"has-symbol-support-x":3}],5:[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":4,"is-primitive":6,"to-string-tag-x":10}],6:[function(t,e,n){"use strict";e.exports=function isPrimitive(t){return null==t||"function"!=typeof t&&"object"!=typeof t}},{}],7:[function(t,e,n){function isNull(t){return null===t}e.exports=isNull},{}],8:[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":9}],9:[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}},{}],10:[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":7,"validate.io-undefined":11}],11:[function(t,e,n){"use strict";function isUndefined(t){return void 0===t}e.exports=isUndefined},{}]},{},[1])(1)});
//# sourceMappingURL=lib/define-properties-x.map
{
"name": "define-properties-x",
"version": "1.2.0",
"version": "1.2.1",
"description": "Based on the original work by Jordan Harband https://www.npmjs.com/package/define-properties",

@@ -10,3 +10,3 @@ "homepage": "https://github.com/Xotic750/define-properties-x",

},
"copyright": "Copyright (c) 2015-2016",
"copyright": "Copyright (c) 2015-2017",
"keywords": [

@@ -37,4 +37,6 @@ "ES6",

"dependencies": {
"has-symbol-support-x": "^1.1.0",
"is-function-x": "^1.1.0",
"foreach": "^2.0.5",
"has-symbol-support-x": "^1.1.1",
"is-function-x": "^1.1.1",
"object-keys": "^1.0.11",
"validate.io-undefined": "^1.0.3"

@@ -44,25 +46,31 @@ },

"@ljharb/eslint-config": "^11.0.0",
"browserify": "^14.1.0",
"browserify-derequire": "^0.9.4",
"es5-shim": "^4.5.9",
"es6-shim": "^0.35.3",
"es7-shim": "^6.0.0",
"eslint": "^3.16.1",
"eslint": "^3.18.0",
"eslint-plugin-import": "^2.2.0",
"json3": "^3.3.2",
"jscs": "^3.0.7",
"uglify-js": "^2.7.5",
"browserify": "^14.1.0",
"browserify-derequire": "^0.9.4",
"jasmine-node": "^1.14.5",
"jsdoc-to-markdown": "^3.0.0",
"nsp": "^2.6.2"
"json3": "^3.3.2",
"make-jasmine-spec-runner-html": "^1.0.4",
"nodemon": "^1.11.0",
"nsp": "^2.6.3",
"replace-x": "^1.0.0",
"uglify-js": "^2.8.16"
},
"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",
"security": "nsp check",
"test": "jasmine-node --matchall tests/spec/",
"security": "nsp check",
"style": "jscs index.js",
"eslint": "eslint *.js tests/spec/*.js",
"docs": "jsdoc2md --name-format --example-lang js index.js > README.md",
"build": "browserify -p browserify-derequire -e index.js -o lib/define-properties-x.js -u 'crypto' -s returnExports",
"build-uglify": "uglifyjs lib/define-properties-x.js -o lib/define-properties-x.min.js --compress --keep-fnames --mangle --beautify ascii_only=true,beautify=false --source-map lib/define-properties-x.map"
"test:watch": "nodemon --watch tests/spec/test.js --exec 'npm test'",
"browserify": "browserify -p browserify-derequire -e index.js -o lib/define-properties-x.js -u 'crypto' -s returnExports",
"uglify": "uglifyjs lib/define-properties-x.js -o lib/define-properties-x.min.js --compress --keep-fnames --mangle --beautify ascii_only=true,beautify=false --source-map lib/define-properties-x.map"
}
}

@@ -26,24 +26,9 @@ <a name="module_define-properties-x"></a>

Based on the original work by Jordan Harband
[`define-properties`](https://www.npmjs.com/package/define-properties).
Define multiple non-enumerable properties at once.
<h2>ECMAScript compatibility shims for legacy JavaScript engines</h2>
`es5-shim.js` monkey-patches a JavaScript context to contain all EcmaScript 5
methods that can be faithfully emulated with a legacy JavaScript engine.
Requires ES3 or above.
`es5-sham.js` monkey-patches other ES5 methods as closely as possible.
For these methods, as closely as possible to ES5 is not very close.
Many of these shams are intended only to allow code to be written to ES5
without causing run-time errors in older engines. In many cases,
this means that these shams cause many ES5 methods to silently fail.
Decide carefully whether this is what you want. Note: es5-sham.js requires
es5-shim.js to be able to work properly.
`json3.js` monkey-patches the EcmaScript 5 JSON implimentation faithfully.
`es6.shim.js` provides compatibility shims so that legacy JavaScript engines
behave as closely as possible to ECMAScript 6 (Harmony).
**Version**: 1.2.0
**Author:** Xotic750 <Xotic750@gmail.com>
**See**: [define-properties](https://www.npmjs.com/package/define-properties)
**Version**: 1.2.1
**Author**: Xotic750 <Xotic750@gmail.com>
**License**: [MIT](&lt;https://opensource.org/licenses/MIT&gt;)

@@ -110,3 +95,3 @@ **Copyright**: Xotic750

| object | <code>Object</code> | | The object on which to define the property. |
| prop | <code>string</code> &#124; <code>Symbol</code> | | The property name. |
| prop | <code>string</code> \| <code>Symbol</code> | | The property name. |
| value | <code>\*</code> | | The value of the property. |

@@ -113,0 +98,0 @@ | [force] | <code>boolean</code> | <code>false</code> | If `true` then set property regardless. |

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