From 57410cb1ade13291b841399b010b28d566738a34 Mon Sep 17 00:00:00 2001 From: Ariyan Khan Date: Tue, 13 Jun 2017 22:42:03 +0530 Subject: [PATCH] add `dist` folder --- dist/collections-es6.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 dist/collections-es6.js diff --git a/dist/collections-es6.js b/dist/collections-es6.js new file mode 100644 index 0000000..fe6600c --- /dev/null +++ b/dist/collections-es6.js @@ -0,0 +1 @@ +!function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t):e(t)}("undefined"!=typeof window?window:global,function(t){"use strict";var e=Object.defineProperty,i=Object.defineProperties,r=Array.isArray,o=Object.create,n="object"==typeof t.ES6?t.ES6:t.ES6={},a=function(t){return"function"==typeof t},s=function(t,e){this._map=t,this._flag=e,this._currentEntry=null,this._done=!1},l=function(t,e){this._set=t,this._flag=e,this._currentEntry=null,this._done=!1},h=function(t){return null!==t&&("object"==typeof t||"function"==typeof t)},u=function(t){var e=String(t);return void 0===t||null===t?"I___"+e:"number"==typeof t?"N___"+e:"string"==typeof t?"S___"+e:"boolean"==typeof t?"B___"+e:null},p=function t(e){if(!(this instanceof t)||v(this))throw new TypeError("Constructor Map requires 'new'");c(this),null!==e&&void 0!==e&&n.forOf(e,function(t){if(!h(t))throw new TypeError("Iterator value "+t+" is not an entry object");this.set(t[0],t[1])},this)};p.prototype.set=function(t,i){if(!v(this))throw new TypeError("Method Map.prototype.set called on incompatible receiver "+this);var r,o=u(t),n=this._objectHash;if(null===o){if("number"==typeof t[n]&&this._data.objects[t[n]]instanceof d)return r=this._data.objects[t[n]],r.value=i,this;r=new d(t,i),this._data.objects.push(r),e(t,n.toString(),{value:this._data.objects.length-1,configurable:!0}),this._size++}else{if(this._data.primitives[o]instanceof d)return r=this._data.primitives[o],r.value=i,this;r=new d(t,i),this._data.primitives[o]=r,this._size++}return null===this._head&&(this._head=r,r.next=null,r.prev=null),null===this._tail?this._tail=this._head:(this._tail.next=r,r.prev=this._tail,r.next=null,this._tail=r),this},p.prototype.has=function(t){if(!v(this))throw new TypeError("Method Map.prototype.has called on incompatible receiver "+this);var e=u(t),i=this._objectHash;return null===e?"number"==typeof t[i]&&this._data.objects[t[i]]instanceof d:this._data.primitives[e]instanceof d},p.prototype.get=function(t){if(!v(this))throw new TypeError("Method Map.prototype.get called on incompatible receiver "+this);var e=u(t),i=this._objectHash;if(null===e){if("number"==typeof t[i]&&this._data.objects[t[i]]instanceof d)return this._data.objects[t[i]].value}else if(this._data.primitives[e]instanceof d)return this._data.primitives[e].value},p.prototype.clear=function(){if(!v(this))throw new TypeError("Method Map.prototype.clear called on incompatible receiver "+this);var t;Object.getOwnPropertyNames(this._data.primitives).forEach(function(e){this._data.primitives[e]instanceof d&&(t=this._data.primitives[e],delete this._data.primitives[e],t.next=null,t.prev=null)},this),Object.getOwnPropertyNames(this._data.objects).forEach(function(e){this._data.objects[e]instanceof d&&(t=this._data.objects[e],delete this._data.objects[e],delete t.key[this._objectHash],t.next=null,t.prev=null)},this),this._data.objects.length=0,this._head=null,this._tail=null,this._size=0},p.prototype.delete=function(t){if(!v(this))throw new TypeError("Method Map.prototype.delete called on incompatible receiver "+this);var e,i=u(t),r=this._objectHash;if(null===i){if(!("number"==typeof t[r]&&this._data.objects[t[r]]instanceof d))return!1;e=this._data.objects[t[r]],delete this._data.objects[t[r]],delete e.key[r]}else{if(!(this._data.primitives[i]instanceof d))return!1;e=this._data.primitives[i],delete this._data.primitives[i]}return null!==e.prev&&null!==e.next?(e.prev.next=e.next,e.next.prev=e.prev,e.next=null,e.prev=null):null===e.prev&&null!==e.next&&(this._head=e.next,e.next.prev=null,e.next=null),null!==e.prev&&null===e.next?(this._tail=e.prev,e.prev.next=null,e.prev=null):(this._head=null,this._tail=null),this._size--,!0},e(p.prototype,"size",{get:function(){if(!v(this))throw new TypeError("Method Map.prototype.size called on incompatible receiver "+this);return this._size},configurable:!0}),p.prototype.entries=function(){if(!v(this))throw new TypeError("Method Map.prototype.entries called on incompatible receiver "+this);return new s(this,1)},p.prototype.values=function(){if(!v(this))throw new TypeError("Method Map.prototype.values called on incompatible receiver "+this);return new s(this,2)},p.prototype.keys=function(){if(!v(this))throw new TypeError("Method Map.prototype.keys called on incompatible receiver "+this);return new s(this,3)},p.prototype.forEach=function(t,e){if(!v(this))throw new TypeError("Method Map.prototype.forEach called on incompatible receiver "+this);if(!a(t))throw new TypeError(t+" is not a function");for(var i=this._head;null!==i;)t.call(e,i.value,i.key,this),i=i.next},p.prototype[Symbol.iterator]=p.prototype.entries,e(p.prototype,Symbol.toStringTag.toString(),{value:"Map",configurable:!0});var c=function(t){i(t,{_isMap:{value:!0},_head:{value:null,writable:!0},_tail:{value:null,writable:!0},_objectHash:{value:Symbol("Hash(map)")},_size:{value:0,writable:!0},_data:{value:o(null,{primitives:{value:o(null)},objects:{value:[]}})}})},f=function(t){return!0===t._isMap&&(null===t._head||t._head instanceof d)&&(null===t._tail||t._tail instanceof d)&&n.isSymbol(t._objectHash)&&"number"==typeof t._size&&h(t._data)&&h(t._data.primitives)&&r(t._data.objects)},v=function(t){return t instanceof p&&f(t)},d=function(t,e){this.key=t,this.value=e,this.next=null,this.prev=null},_=function t(e){if(!(this instanceof t)||m(this))throw new TypeError("Constructor Set requires 'new'");b(this),null!==e&&void 0!==e&&n.forOf(e,function(t){this.add(t)},this)};_.prototype.add=function(t){if(!m(this))throw new TypeError("Method Set.prototype.add called on incompatible receiver "+this);var i,r=u(t),o=this._objectHash;if(null===r){if("number"==typeof t[o]&&this._data.objects[t[o]]instanceof w)return this;i=new w(t),this._data.objects.push(i),e(t,o.toString(),{value:this._data.objects.length-1,configurable:!0}),this._size++}else{if(this._data.primitives[r]instanceof w)return this;i=new w(t),this._data.primitives[r]=i,this._size++}return null===this._head&&(this._head=i,i.next=null,i.prev=null),null===this._tail?this._tail=this._head:(this._tail.next=i,i.prev=this._tail,i.next=null,this._tail=i),this},_.prototype.has=function(t){if(!m(this))throw new TypeError("Method Set.prototype.has called on incompatible receiver "+this);var e=u(t),i=this._objectHash;return null===e?"number"==typeof t[i]&&this._data.objects[t[i]]instanceof w:this._data.primitives[e]instanceof w},_.prototype.clear=function(){if(!m(this))throw new TypeError("Method Set.prototype.clear called on incompatible receiver "+this);var t;Object.getOwnPropertyNames(this._data.primitives).forEach(function(e){this._data.primitives[e]instanceof w&&(t=this._data.primitives[e],delete this._data.primitives[e],t.next=null,t.prev=null)},this),Object.getOwnPropertyNames(this._data.objects).forEach(function(e){this._data.objects[e]instanceof w&&(t=this._data.objects[e],delete this._data.objects[e],delete t.value[this._objectHash],t.next=null,t.prev=null)},this),this._data.objects.length=0,this._head=null,this._tail=null,this._size=0},_.prototype.delete=function(t){if(!m(this))throw new TypeError("Method Set.prototype.delete called on incompatible receiver "+this);var e,i=u(t),r=this._objectHash;if(null===i){if(!("number"==typeof t[r]&&this._data.objects[t[r]]instanceof w))return!1;e=this._data.objects[t[r]],delete this._data.objects[t[r]],delete e.value[r]}else{if(!(this._data.primitives[i]instanceof w))return!1;e=this._data.primitives[i],delete this._data.primitives[i]}return null!==e.prev&&null!==e.next?(e.prev.next=e.next,e.next.prev=e.prev,e.next=null,e.prev=null):null===e.prev&&null!==e.next&&(this._head=e.next,e.next.prev=null,e.next=null),null!==e.prev&&null===e.next?(this._tail=e.prev,e.prev.next=null,e.prev=null):(this._head=null,this._tail=null),this._size--,!0},_.prototype.entries=function(){if(!m(this))throw new TypeError("Method Set.prototype.entries called on incompatible receiver "+this);return new l(this,1)},_.prototype.values=function(){if(!m(this))throw new TypeError("Method Set.prototype.values called on incompatible receiver "+this);return new l(this,2)},_.prototype.keys=_.prototype.values,_.prototype[Symbol.iterator]=_.prototype.values,e(_.prototype,"size",{get:function(){if(!m(this))throw new TypeError("Method Set.prototype.size called on incompatible receiver "+this);return this._size},configurable:!0}),_.prototype.forEach=function(t,e){if(!m(this))throw new TypeError("Method Set.prototype.forEach called on incompatible receiver "+this);if(!a(t))throw new TypeError(t+" is not a function");for(var i=this._head;null!==i;)t.call(e,i.value,i.value,this),i=i.next},e(_.prototype,Symbol.toStringTag.toString(),{value:"Set",configurable:!0});var b=function(t){i(t,{_isSet:{value:!0},_head:{value:null,writable:!0},_tail:{value:null,writable:!0},_objectHash:{value:Symbol("Hash(set)")},_size:{value:0,writable:!0},_data:{value:o(null,{primitives:{value:o(null)},objects:{value:[]}})}})},y=function(t){return!0===t._isSet&&(null===t._head||t._head instanceof w)&&(null===t._tail||t._tail instanceof w)&&n.isSymbol(t._objectHash)&&"number"==typeof t._size&&h(t._data)&&h(t._data.primitives)&&r(t._data.objects)},w=function(t){this.value=t,this.next=null,this.prev=null},m=function(t){return t instanceof _&&y(t)},j=function t(e){if(!(this instanceof t)||M(this))throw new TypeError("Constructor WeakMap requires 'new'");S(this),null!==e&&void 0!==e&&n.forOf(e,function(t){if(!h(t))throw new TypeError("Iterator value "+t+" is not an entry object");this.set(t[0],t[1])},this)},S=function(t){i(t,{_isWeakMap:{value:!0},_objectHash:{value:Symbol("Hash(weakmap)")},_values:{value:[]}})};e(j.prototype,Symbol.toStringTag.toString(),{value:"WeakMap",configurable:!0});var g=function(t){return!0===t._isWeakMap&&n.isSymbol(t._objectHash)&&r(t._values)},M=function(t){return t instanceof j&&g(t)};j.prototype.set=function(t,i){if(!M(this))throw new TypeError("Method WeakMap.prototype.set called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))throw new TypeError("Invalid value used as weak map key");var r=this._objectHash;return"number"==typeof t[r]&&this._values.hasOwnProperty(t[r])?this._values[t[r]]=i:(this._values.push(i),e(t,r.toString(),{value:this._values.length-1,configurable:!0})),this},j.prototype.get=function(t){if(!M(this))throw new TypeError("Method WeakMap.prototype.get called on incompatible receiver "+this);if(h(t)&&!n.isSymbol(t)){var e=this._objectHash;return"number"==typeof t[e]&&this._values.hasOwnProperty(t[e])?this._values[t[e]]:void 0}},j.prototype.has=function(t){if(!M(this))throw new TypeError("Method WeakMap.prototype.has called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))return!1;var e=this._objectHash;return"number"==typeof t[e]&&this._values.hasOwnProperty(t[e])},j.prototype.delete=function(t){if(!M(this))throw new TypeError("Method WeakMap.prototype.delete called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))return!1;var e=this._objectHash;return!("number"!=typeof t[e]||!this._values.hasOwnProperty(t[e]))&&(delete this._values[t[e]],delete t[e],!0)};var E=function t(e){if(!(this instanceof t)||k(this))throw new TypeError("Constructor WeakSet requires 'new'");T(this),null!==e&&void 0!==e&&n.forOf(e,function(t){this.add(t)},this)},T=function(t){i(t,{_isWeakSet:{value:!0},_objectHash:{value:Symbol("Hash(weakset)")}})},x=function(t){return!0===t._isWeakSet&&n.isSymbol(t._objectHash)},k=function(t){return t instanceof E&&x(t)};return E.prototype.add=function(t){if(!k(this))throw new TypeError("Method WeakSet.prototype.add called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))throw new TypeError("Invalid value used in weak set");var i=this._objectHash;return t[i]===i.toString()||e(t,i.toString(),{value:i.toString(),configurable:!0}),this},E.prototype.has=function(t){if(!k(this))throw new TypeError("Method WeakSet.prototype.has called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))return!1;var e=this._objectHash;return t[e]===e.toString()},E.prototype.delete=function(t){if(!k(this))throw new TypeError("Method WeakSet.prototype.delete called on incompatible receiver "+this);if(!h(t)||n.isSymbol(t))return!1;var e=this._objectHash;return t[e]===e.toString()&&(delete t[e],!0)},e(E.prototype,Symbol.toStringTag.toString(),{value:"WeakSet",configurable:!0}),i(n,{isMap:{value:v,writable:!0,configurable:!0},isSet:{value:m,writable:!0,configurable:!0},isWeakMap:{value:M,writable:!0,configurable:!0},isWeakSet:{value:k,writable:!0,configurable:!0}}),e(t,"Map",{value:p,writable:!0,configurable:!0}),e(t,"Set",{value:_,writable:!0,configurable:!0}),e(t,"WeakMap",{value:j,writable:!0,configurable:!0}),e(t,"WeakSet",{value:E,writable:!0,configurable:!0}),n}); \ No newline at end of file