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

@nolyfill/shared

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nolyfill/shared - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

40

./index.js
'use strict';
/** uncurryThis */
const { bind, call } = Function.prototype;
const uncurryThis = bind.bind(call);
module.exports.uncurryThis = uncurryThis;
/** TypedArrayPrototype */
const TypedArrayPrototype = Object.getPrototypeOf(Uint8Array.prototype);
module.exports.uncurryThis = uncurryThis;
module.exports.TypedArrayPrototype = TypedArrayPrototype;
/** defineProperties */
const defineProperty = (object, name, value, predicate) => {
if (name in object) {
if (predicate === true) {
if (object[name] === value) {
return;
}
} else if (
!(typeof predicate === 'function' && Object.prototype.toString.call(predicate) === '[object Function]')
|| !predicate()
) {
return;
}
}
Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
value,
writable: true
});
};
const defineProperties = (object, map, predicates = {}) => {
const props = Array.prototype.concat.call(Object.keys(map), Object.getOwnPropertySymbols(map));
for (let i = 0, l = props.length; i < l; i++) {
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
}
};
module.exports.defineProperties = defineProperties;
/** makeEsShim */
const makeEsShim = (shim, implementation) => defineProperties(shim, {
implementation,
getPolyfill: () => implementation,
shim: () => implementation
});
module.exports.makeEsShim = makeEsShim;
'use strict';
/** uncurryThis */
const { bind, call } = Function.prototype;
const uncurryThis = bind.bind(call);
module.exports.uncurryThis = uncurryThis;
/** TypedArrayPrototype */
const TypedArrayPrototype = Object.getPrototypeOf(Uint8Array.prototype);
module.exports.uncurryThis = uncurryThis;
module.exports.TypedArrayPrototype = TypedArrayPrototype;
/** defineProperties */
const defineProperty = (object, name, value, predicate) => {
if (name in object) {
if (predicate === true) {
if (object[name] === value) {
return;
}
} else if (
!(typeof predicate === 'function' && Object.prototype.toString.call(predicate) === '[object Function]')
|| !predicate()
) {
return;
}
}
Object.defineProperty(object, name, {
configurable: true,
enumerable: false,
value,
writable: true
});
};
const defineProperties = (object, map, predicates = {}) => {
const props = Array.prototype.concat.call(Object.keys(map), Object.getOwnPropertySymbols(map));
for (let i = 0, l = props.length; i < l; i++) {
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
}
};
module.exports.defineProperties = defineProperties;
/** makeEsShim */
const makeEsShim = (shim, implementation) => defineProperties(shim, {
implementation,
getPolyfill: () => implementation,
shim: () => implementation
});
module.exports.makeEsShim = makeEsShim;

2

package.json
{
"name": "@nolyfill/shared",
"version": "1.0.11",
"version": "1.0.12",
"main": "./index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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