Socket
Socket
Sign inDemoInstall

weakmap

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.3 to 0.0.4

2

package.json

@@ -6,3 +6,3 @@ {

"keywords": ["harmony", "collection", "weakmap","ecmascript", "es6", "shim", "garbage collection", "gc"],
"version": "0.0.3",
"version": "0.0.4",
"homepage": "http://benvie.github.com/WeakMap",

@@ -9,0 +9,0 @@ "repository": {

@@ -196,2 +196,4 @@ /* (The MIT License)

prep(WeakMap);
[toString, get, set, has, del].forEach(function(method){

@@ -198,0 +200,0 @@ define(WeakMap.prototype, method);

@@ -6,2 +6,2 @@ /* (The MIT License)

void function(e,h,b){function define(c,a,b){return typeof a==='function'&&(b=a,a=nameOf(b).replace(/_$/,'')),d(c,a,{configurable:!0,writable:!0,value:b})}function nameOf(a){return typeof a!=='function'?'':'name'in a?a.name:k.call(a).match(j)[1]}'use strict';var i=Object.getOwnPropertyNames,d=Object.defineProperty,k=Function.prototype.toString,f=Object.create,g=Object.prototype.hasOwnProperty,j=/^\n?function\s?(\w*)?_?\(/;var c=function(){function c(){var a=e(),b={};this.unlock=function(h){var c=l(h);if(g.call(c,a))return c[a](b);var e=f(null,j);return d(c,a,{value:new Function('s','l',k)(b,e)}),e}}var j={value:{writable:!0,value:b}},k='return function(k){if(k===s)return l}',h=f(null),e=function(){var a=Math.random().toString(36).slice(2);return a in h?e():h[a]=a},a=e(),l=function(b){if(g.call(b,a))return b[a];if(!Object.isExtensible(b))throw new TypeError('Object must be extensible');var c=f(null);return d(b,a,{value:c}),c};return define(Object,function getOwnPropertyNames(c){var b=i(c);return g.call(c,a)&&b.splice(b.indexOf(a),1),b}),define(c.prototype,function get(a){return this.unlock(a).value}),define(c.prototype,function set(a,b){this.unlock(a).value=b}),c}();var a=function(g){function validate(a){if(a==null||typeof a!=='object'&&typeof a!=='function')throw new TypeError('Invalid WeakMap key')}function wrap(b,c){var a=g.unlock(b);if(a.value)throw new TypeError('Object is already a WeakMap');a.value=c}function unwrap(b){var a=g.unlock(b).value;if(!a)throw new TypeError('WeakMap is not generic');return a}function initialize(b,a){a!==null&&typeof a==='object'&&typeof a.forEach==='function'&&a.forEach(function(c,d){c instanceof Array&&c.length===2&&set.call(b,a[d][0],a[d][1])})}function a(b){if(this===e||this==null||this===a.prototype)return new a(b);wrap(this,new c),initialize(this,b)}function get(a){validate(a);var c=unwrap(this).get(a);return c===h?b:c}function set(a,c){validate(a),unwrap(this).set(a,c===b?h:c)}function has(a){return validate(a),unwrap(this).get(a)!==b}function delete_(a){validate(a);var c=unwrap(this),d=c.get(a)!==b;return c.set(a,b),d}function toString(){return unwrap(this),'[object WeakMap]'}try{var d=('return '+delete_).replace('e_','\\u0065'),i=new Function('unwrap','validate',d)(unwrap,validate)}catch(a){var i=delete_}var d=(''+Object).split('Object');var f=function toString(){return d[0]+nameOf(this)+d[1]};define(f,f);var j={__proto__:[]}instanceof Array?function(a){a.__proto__=f}:function(a){define(a,f)};return[toString,get,set,has,i].forEach(function(b){define(a.prototype,b),j(b)}),a}(new c);typeof module!=='undefined'?module.exports=a:typeof exports!=='undefined'?exports.WeakMap=a:!('WeakMap'in e)&&(e.WeakMap=a)}(new Function('return this')(),{})
void function(e,h,b){function define(c,a,b){return typeof a==='function'&&(b=a,a=nameOf(b).replace(/_$/,'')),d(c,a,{configurable:!0,writable:!0,value:b})}function nameOf(a){return typeof a!=='function'?'':'name'in a?a.name:k.call(a).match(j)[1]}'use strict';var i=Object.getOwnPropertyNames,d=Object.defineProperty,k=Function.prototype.toString,f=Object.create,g=Object.prototype.hasOwnProperty,j=/^\n?function\s?(\w*)?_?\(/;var c=function(){function c(){var a=e(),b={};this.unlock=function(h){var c=l(h);if(g.call(c,a))return c[a](b);var e=f(null,j);return d(c,a,{value:new Function('s','l',k)(b,e)}),e}}var j={value:{writable:!0,value:b}},k='return function(k){if(k===s)return l}',h=f(null),e=function(){var a=Math.random().toString(36).slice(2);return a in h?e():h[a]=a},a=e(),l=function(b){if(g.call(b,a))return b[a];if(!Object.isExtensible(b))throw new TypeError('Object must be extensible');var c=f(null);return d(b,a,{value:c}),c};return define(Object,function getOwnPropertyNames(c){var b=i(c);return g.call(c,a)&&b.splice(b.indexOf(a),1),b}),define(c.prototype,function get(a){return this.unlock(a).value}),define(c.prototype,function set(a,b){this.unlock(a).value=b}),c}();var a=function(g){function validate(a){if(a==null||typeof a!=='object'&&typeof a!=='function')throw new TypeError('Invalid WeakMap key')}function wrap(b,c){var a=g.unlock(b);if(a.value)throw new TypeError('Object is already a WeakMap');a.value=c}function unwrap(b){var a=g.unlock(b).value;if(!a)throw new TypeError('WeakMap is not generic');return a}function initialize(b,a){a!==null&&typeof a==='object'&&typeof a.forEach==='function'&&a.forEach(function(c,d){c instanceof Array&&c.length===2&&set.call(b,a[d][0],a[d][1])})}function WeakMap(b){if(this===e||this==null||this===WeakMap.prototype)return new WeakMap(b);wrap(this,new c),initialize(this,b)}function get(a){validate(a);var c=unwrap(this).get(a);return c===h?b:c}function set(a,c){validate(a),unwrap(this).set(a,c===b?h:c)}function has(a){return validate(a),unwrap(this).get(a)!==b}function delete_(a){validate(a);var c=unwrap(this),d=c.get(a)!==b;return c.set(a,b),d}function toString(){return unwrap(this),'[object WeakMap]'}try{var d=('return '+delete_).replace('e_','\\u0065'),i=new Function('unwrap','validate',d)(unwrap,validate)}catch(a){var i=delete_}var d=(''+Object).split('Object');var f=function toString(){return d[0]+nameOf(this)+d[1]};define(f,f);var j={__proto__:[]}instanceof Array?function(a){a.__proto__=f}:function(a){define(a,f)};return j(WeakMap),[toString,get,set,has,i].forEach(function(b){define(WeakMap.prototype,b),j(b)}),WeakMap}(new c);typeof module!=='undefined'?module.exports=a:typeof exports!=='undefined'?exports.WeakMap=a:!('WeakMap'in e)&&(e.WeakMap=a)}(new Function('return this')(),{})
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc