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

cached-constructors-x

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cached-constructors-x - npm Package Compare versions

Comparing version 2.0.25 to 2.1.0

65

dist/cached-constructors-x.esm.js

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

import noop from 'noop-x';
/**

@@ -6,4 +7,12 @@ * Cached Array constructor.

*/
export var ArrayCtr = [].constructor;
/**
* Cached Array prototype.
*
* @type {!object}
*/
export var ArrayPrototype = ArrayCtr.prototype;
/**
* Cached Array constructor.

@@ -16,13 +25,25 @@ *

/**
* Cached Array constructor.
* Cached Boolean prototype.
*
* @type {!object}
*/
export var BooleanPrototype = BooleanCtr.prototype;
/**
* Cached Function constructor.
*
* @class Function
*/
export var FunctionCtr = function noop() {
return undefined;
}.constructor;
export var FunctionCtr = noop.constructor;
/**
* Cached Array constructor.
* Cached Function prototype.
*
* @type {!object}
*/
export var FunctionPrototype = FunctionCtr.prototype;
/**
* Cached Number constructor.
*
* @class Number

@@ -33,4 +54,11 @@ */

/**
* Cached Array constructor.
* Cached Number prototype.
*
* @type {!object}
*/
export var NumberPrototype = NumberCtr.prototype;
/**
* Cached Object constructor.
*
* @class Object

@@ -41,4 +69,11 @@ */

/**
* Cached Array constructor.
* Cached Object prototype.
*
* @type {!object}
*/
export var ObjectPrototype = ObjectCtr.prototype;
/**
* Cached RegExp constructor.
*
* @class RegExp

@@ -49,4 +84,11 @@ */

/**
* Cached Array constructor.
* Cached RegExp prototype.
*
* @type {!object}
*/
export var RegExpPrototype = RegExpCtr.prototype;
/**
* Cached String constructor.
*
* @class String

@@ -56,3 +98,10 @@ */

export var StringCtr = ''.constructor;
/**
* Cached String prototype.
*
* @type {!object}
*/
export var StringPrototype = StringCtr.prototype;
//# sourceMappingURL=cached-constructors-x.esm.js.map

@@ -5,9 +5,9 @@ /*!

"copywrite": "Copyright (c) 2017-present",
"date": "2019-07-31T21:39:23.823Z",
"date": "2019-08-14T13:29:16.481Z",
"describe": "",
"description": "Constructors cached from literals.",
"file": "cached-constructors-x.js",
"hash": "6d282f9108b134ba6b0b",
"hash": "93d451540fea6f751712",
"license": "MIT",
"version": "2.0.25"
"version": "2.1.0"
}

@@ -27,15 +27,44 @@ */

if (typeof self !== 'undefined') {
return self;
}
var ObjectCtr = {}.constructor;
var objectPrototype = ObjectCtr.prototype;
var defineProperty = ObjectCtr.defineProperty;
var $globalThis;
var getGlobalFallback = function() {
if (typeof self !== 'undefined') {
return self;
}
if (typeof window !== 'undefined') {
return window;
}
if (typeof window !== 'undefined') {
return window;
}
if (typeof global !== 'undefined') {
return global;
if (typeof global !== 'undefined') {
return global;
}
return void 0;
};
var returnThis = function() {
return this;
};
try {
if (defineProperty) {
defineProperty(objectPrototype, '$$globalThis$$', {
get: returnThis,
configurable: true
});
} else {
objectPrototype.__defineGetter__('$$globalThis$$', returnThis);
}
$globalThis = typeof $$globalThis$$ === 'undefined' ? getGlobalFallback() : $$globalThis$$;
delete objectPrototype.$$globalThis$$;
return $globalThis;
} catch (error) {
return getGlobalFallback();
}
return Function('return this')();
}()), function() {

@@ -134,9 +163,32 @@ return /******/ (function(modules) { // webpackBootstrap

__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/noop-x/dist/noop-x.esm.js
/**
* This method returns undefined.
*
* @returns {undefined} Always undefined.
*/
var noop = function noop() {};
/* eslint-disable-line lodash/prefer-noop */
/* harmony default export */ var noop_x_esm = (noop);
// CONCATENATED MODULE: ./dist/cached-constructors-x.esm.js
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayCtr", function() { return ArrayCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ArrayPrototype", function() { return ArrayPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanCtr", function() { return BooleanCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BooleanPrototype", function() { return BooleanPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionCtr", function() { return FunctionCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FunctionPrototype", function() { return FunctionPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberCtr", function() { return NumberCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NumberPrototype", function() { return NumberPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectCtr", function() { return ObjectCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ObjectPrototype", function() { return ObjectPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegExpCtr", function() { return RegExpCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegExpPrototype", function() { return RegExpPrototype; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringCtr", function() { return StringCtr; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StringPrototype", function() { return StringPrototype; });
/**

@@ -147,4 +199,12 @@ * Cached Array constructor.

*/
var ArrayCtr = [].constructor;
/**
* Cached Array prototype.
*
* @type {!object}
*/
var ArrayPrototype = ArrayCtr.prototype;
/**
* Cached Array constructor.

@@ -157,13 +217,25 @@ *

/**
* Cached Array constructor.
* Cached Boolean prototype.
*
* @type {!object}
*/
var BooleanPrototype = BooleanCtr.prototype;
/**
* Cached Function constructor.
*
* @class Function
*/
var FunctionCtr = function noop() {
return undefined;
}.constructor;
var FunctionCtr = noop_x_esm.constructor;
/**
* Cached Array constructor.
* Cached Function prototype.
*
* @type {!object}
*/
var FunctionPrototype = FunctionCtr.prototype;
/**
* Cached Number constructor.
*
* @class Number

@@ -174,4 +246,11 @@ */

/**
* Cached Array constructor.
* Cached Number prototype.
*
* @type {!object}
*/
var NumberPrototype = NumberCtr.prototype;
/**
* Cached Object constructor.
*
* @class Object

@@ -182,4 +261,11 @@ */

/**
* Cached Array constructor.
* Cached Object prototype.
*
* @type {!object}
*/
var ObjectPrototype = ObjectCtr.prototype;
/**
* Cached RegExp constructor.
*
* @class RegExp

@@ -190,4 +276,11 @@ */

/**
* Cached Array constructor.
* Cached RegExp prototype.
*
* @type {!object}
*/
var RegExpPrototype = RegExpCtr.prototype;
/**
* Cached String constructor.
*
* @class String

@@ -197,5 +290,12 @@ */

var StringCtr = ''.constructor;
/**
* Cached String prototype.
*
* @type {!object}
*/
var StringPrototype = StringCtr.prototype;
/***/ })

@@ -202,0 +302,0 @@ /******/ ]);

8

dist/cached-constructors-x.min.js

@@ -5,12 +5,12 @@ /*!

"copywrite": "Copyright (c) 2017-present",
"date": "2019-07-31T21:39:23.823Z",
"date": "2019-08-14T13:29:16.481Z",
"describe": "",
"description": "Constructors cached from literals.",
"file": "cached-constructors-x.min.js",
"hash": "c2862a73c0baf34aa1ec",
"hash": "91ee2cdcfe2b62ae8ade",
"license": "MIT",
"version": "2.0.25"
"version": "2.1.0"
}
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cachedConstructorsX=e():t.cachedConstructorsX=e()}(function(){"use strict";return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")()}(),function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e),n.d(e,"ArrayCtr",function(){return r}),n.d(e,"BooleanCtr",function(){return o}),n.d(e,"FunctionCtr",function(){return u}),n.d(e,"NumberCtr",function(){return c}),n.d(e,"ObjectCtr",function(){return f}),n.d(e,"RegExpCtr",function(){return i}),n.d(e,"StringCtr",function(){return d});var r=[].constructor,o=(!0).constructor,u=function(){}.constructor,c=(0).constructor,f={}.constructor,i=/none/.constructor,d="".constructor}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cachedConstructorsX=e():t.cachedConstructorsX=e()}(function(){"use strict";var t,e={}.constructor,r=e.prototype,n=e.defineProperty,o=function(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0},u=function(){return this};try{return n?n(r,"$$globalThis$$",{get:u,configurable:!0}):r.__defineGetter__("$$globalThis$$",u),t="undefined"==typeof $$globalThis$$?o():$$globalThis$$,delete r.$$globalThis$$,t}catch(t){return o()}}(),function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";r.r(e);var n=function(){};r.d(e,"ArrayCtr",function(){return o}),r.d(e,"ArrayPrototype",function(){return u}),r.d(e,"BooleanCtr",function(){return c}),r.d(e,"BooleanPrototype",function(){return i}),r.d(e,"FunctionCtr",function(){return f}),r.d(e,"FunctionPrototype",function(){return p}),r.d(e,"NumberCtr",function(){return d}),r.d(e,"NumberPrototype",function(){return l}),r.d(e,"ObjectCtr",function(){return s}),r.d(e,"ObjectPrototype",function(){return y}),r.d(e,"RegExpCtr",function(){return a}),r.d(e,"RegExpPrototype",function(){return b}),r.d(e,"StringCtr",function(){return $}),r.d(e,"StringPrototype",function(){return g});var o=[].constructor,u=o.prototype,c=(!0).constructor,i=c.prototype,f=n.constructor,p=f.prototype,d=(0).constructor,l=d.prototype,s={}.constructor,y=s.prototype,a=/none/.constructor,b=a.prototype,$="".constructor,g=$.prototype}])});
//# sourceMappingURL=cached-constructors-x.min.js.map
{
"name": "cached-constructors-x",
"version": "2.0.25",
"version": "2.1.0",
"description": "Constructors cached from literals.",

@@ -41,2 +41,3 @@ "homepage": "https://github.com/Xotic750/cached-constructors-x",

"test:ci": "npm run test -- --ci --maxWorkers=2",
"test:ci-coveralls": "npm run test:ci -- --coverage --coverageReporters=text-lcov | coveralls",
"test:coverage": "npm run test -- --coverage"

@@ -52,3 +53,5 @@ },

},
"dependencies": {},
"dependencies": {
"noop-x": "^1.1.0"
},
"devDependencies": {

@@ -62,5 +65,6 @@ "@babel/cli": "^7.5.5",

"@babel/runtime": "^7.5.5",
"@types/jest": "^24.0.16",
"@types/node": "^12.6.8",
"@xotic750/eslint-config-recommended": "^1.0.5",
"@types/jest": "^24.0.17",
"@types/node": "^12.7.1",
"@types/webpack": "^4.32.1",
"@xotic750/eslint-config-recommended": "^1.1.2",
"babel-core": "^7.0.0-0",

@@ -70,5 +74,6 @@ "babel-eslint": "^10.0.2",

"babel-plugin-lodash": "^3.3.4",
"caniuse-lite": "^1.0.30000988",
"caniuse-lite": "^1.0.30000989",
"coveralls": "^3.0.6",
"cross-env": "^5.2.0",
"eslint": "=5.16.0",
"eslint": "^6.1.0",
"eslint-friendly-formatter": "^4.0.1",

@@ -83,6 +88,6 @@ "eslint-import-resolver-webpack": "^0.11.1",

"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^22.14.1",
"eslint-plugin-jest": "^22.15.1",
"eslint-plugin-jsdoc": "^15.8.0",
"eslint-plugin-json": "^1.4.0",
"eslint-plugin-lodash": "^5.1.0",
"eslint-plugin-lodash": "^6.0.0",
"eslint-plugin-no-use-extend-native": "^0.4.1",

@@ -107,5 +112,6 @@ "eslint-plugin-prefer-object-spread": "^1.2.1",

"typescript": "^3.5.3",
"webpack": "^4.38.0",
"webpack": "^4.39.1",
"webpack-bundle-analyzer": "^3.4.1",
"webpack-cli": "^3.3.6",
"webpack-global-object-x": "^1.0.0",
"webpack-merge": "^4.2.1"

@@ -112,0 +118,0 @@ },

@@ -38,2 +38,8 @@ <a

</a>
<a
href="https://coveralls.io/github/Xotic750/cached-constructors-x?branch=master"
title="Coverage Status">
<img src="https://coveralls.io/repos/github/Xotic750/cached-constructors-x/badge.svg?branch=master"
alt="Coverage Status" height="18">
</a>

@@ -40,0 +46,0 @@ <a name="module_cached-constructors-x"></a>

@@ -0,1 +1,3 @@

import noop from 'noop-x';
/**

@@ -7,2 +9,8 @@ * Cached Array constructor.

export const ArrayCtr = [].constructor;
/**
* Cached Array prototype.
*
* @type {!object}
*/
export const ArrayPrototype = ArrayCtr.prototype;

@@ -15,14 +23,24 @@ /**

export const BooleanCtr = true.constructor;
/**
* Cached Boolean prototype.
*
* @type {!object}
*/
export const BooleanPrototype = BooleanCtr.prototype;
/**
* Cached Array constructor.
* Cached Function constructor.
*
* @class Function
*/
export const FunctionCtr = function noop() {
return undefined;
}.constructor;
export const FunctionCtr = noop.constructor;
/**
* Cached Function prototype.
*
* @type {!object}
*/
export const FunctionPrototype = FunctionCtr.prototype;
/**
* Cached Array constructor.
* Cached Number constructor.
*

@@ -32,5 +50,11 @@ * @class Number

export const NumberCtr = (0).constructor;
/**
* Cached Number prototype.
*
* @type {!object}
*/
export const NumberPrototype = NumberCtr.prototype;
/**
* Cached Array constructor.
* Cached Object constructor.
*

@@ -40,5 +64,11 @@ * @class Object

export const ObjectCtr = {}.constructor;
/**
* Cached Object prototype.
*
* @type {!object}
*/
export const ObjectPrototype = ObjectCtr.prototype;
/**
* Cached Array constructor.
* Cached RegExp constructor.
*

@@ -48,5 +78,11 @@ * @class RegExp

export const RegExpCtr = /none/.constructor;
/**
* Cached RegExp prototype.
*
* @type {!object}
*/
export const RegExpPrototype = RegExpCtr.prototype;
/**
* Cached Array constructor.
* Cached String constructor.
*

@@ -56,1 +92,7 @@ * @class String

export const StringCtr = ''.constructor;
/**
* Cached String prototype.
*
* @type {!object}
*/
export const StringPrototype = StringCtr.prototype;

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