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

immutable

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

6

dist/Immutable.min.js

@@ -19,4 +19,4 @@ /**

})&&e.next().done},entrySeq:function(){var t=this;if(t._cache)return nr(t._cache);var e=t.toKeyedSeq().map(x).valueSeq();return e.fromEntries=function(){return t},e},findKey:function(t,e){var r;return this.__iterate(function(n,i,u){return t.call(e,n,i,u)?(r=i,!1):void 0}),r},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(k)},flatMap:function(t,e){return this.map(t,e).flatten()},flatten:function(){return N(this,!0)},flip:function(){return R(this)},get:function(t,e){return this.find(function(e,r){return Q(r,t)},null,e)},getIn:function(t,e){var r=this;if(t)for(var n=0;t.length>n;n++)if(r=r&&r.get?r.get(t[n],We):We,r===We)return e;return r},groupBy:function(t,e){return K(this,t,e,!0)},has:function(t){return this.get(t,We)!==We},keySeq:function(){return this.flip().valueSeq()},last:function(){return this.findLast(k)},mapEntries:function(t,e){var r=this;return this.entrySeq().map(function(n,i){return t.call(e,n,i,r)}).fromEntrySeq()},mapKeys:function(t,e){var r=this;return this.flip().map(function(n,i){return t.call(e,n,i,r)}).flip()},rest:function(){return this.slice(1)},skip:function(t){return B(this,t,!0)},skipLast:function(t){return this.reverse().skip(t).reverse()},skipWhile:function(t,e){return L(this,t,e,!0)},skipUntil:function(t,e){return this.skipWhile(D(t),e)},sortBy:function(t,e){e=e||O;var r=this;return nr(this.entrySeq().entrySeq().toArray().sort(function(n,i){return e(t(n[1][1],n[1][0],r),t(i[1][1],i[1][0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq().fromEntrySeq()},take:function(t){return z(this,t)},takeLast:function(t){return this.reverse().take(t).reverse()},takeWhile:function(t,e){return J(this,t,e)},takeUntil:function(t,e){return this.takeWhile(D(t),e)},toKeyedSeq:function(){return this},valueSeq:function(){return new _r(this)},cacheResult:function(){return!this._cache&&this.__iterateUncached&&(A(this.length),this._cache=this.entrySeq().toArray(),null==this.length&&(this.length=this._cache.length)),this
},hashCode:function(){return this.__hash||(this.__hash=1/0===this.length?0:this.reduce(function(t,e,r){return t+(o(e)^(e===r?0:o(r)))&Le},0))},__makeSequence:function(){return Object.create(ir)},__iterate:function(t,e){return E(this,t,e,!0)},__iterator:function(t,e){return j(this,t,e,!0)}},{from:function(t){if(t instanceof nr)return t;if(!Array.isArray(t)){if(p(t))return new or(t);if(g(t))return new hr(t);if(t&&t.constructor===Object)return new cr(t);t=[t]}return new fr(t)}});var ir=rr.prototype;ir[$e]=ir.entries,ir.toJSON=ir.toJS,ir.__toJS=ir.toObject,ir.inspect=ir.toSource=function(){return""+this},ir.chain=ir.flatMap;var ur=function(){Ee.defaultSuperCall(this,ar.prototype,arguments)},ar=ur;Ee.createClass(ur,{toString:function(){return this.__toString("Seq [","]")},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return V(this,t,!1)},filter:function(t,e){return W(this,t,e,!1)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},indexOf:function(t){return this.findIndex(function(e){return Q(e,t)})},lastIndexOf:function(t){return this.toKeyedSeq().reverse().indexOf(t)},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=S(t,this.length);var n=this.slice(0,t);return 1===r?n:n.concat(a(arguments,2),this.slice(t+e))},findLastIndex:function(t,e){return this.toKeyedSeq().reverse().findIndex(t,e)},first:function(){return this.get(0)},flatten:function(){return N(this,!1)},flip:function(){return R(this.toKeyedSeq())},fromEntrySeq:function(){return new vr(this)},get:function(t,e){return t=C(this,t),0>t||1/0===this.length||null!=this.length&&t>this.length?e:this.find(function(e,r){return r===t},null,e)},groupBy:function(t,e){return K(this,t,e,!1)},has:function(t){return t=C(this,t),t>=0&&(null!=this.length?1/0===this.length||this.length>t:-1!==this.indexOf(t))},interpose:function(t){return T(this,t)},last:function(){return this.get(this.length?this.length-1:0)},skip:function(t){var e=this,r=B(this,t,!1);return r!==this&&(r.get=function(r,n){return e.get(r+t,n)
}),r},skipWhile:function(t,e){return L(this,t,e,!1)},sortBy:function(t,e){e=e||O;var r=this;return rr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq()},take:function(t){var e=this,r=z(this,t);return r!==this&&(r.get=function(r,n){return t>r?e.get(r,n):n}),r},toKeyedSeq:function(){return new lr(this)},valueSeq:function(){return this},__makeSequence:function(){return Object.create(sr)},__iterate:function(t,e){return E(this,t,e,!1)},__iterator:function(t,e){return j(this,t,e,!1)}},{},rr);var sr=ur.prototype;sr[$e]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=M;var or=function(t){this._iterator=t,this._iteratorCache=[]};Ee.createClass(or,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var a=u.value;if(n[i]=a,t(a,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new tr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return l(t,i,n[i++])})}},{},ur);var hr=function(t){this._iterable=t,this.length=t.length||t.size};Ee.createClass(hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=m(r),i=0;if(p(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=m(r);if(!p(n))return new tr(function(){return v()});var i=0;return new tr(function(){var e=n.next();return e.done?e:l(t,i++,e.value)})}},{},ur);var cr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};Ee.createClass(cr,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var a=n[e?i-u:u];
},hashCode:function(){return this.__hash||(this.__hash=1/0===this.length?0:this.reduce(function(t,e,r){return t+(o(e)^(e===r?0:o(r)))&Le},0))},__makeSequence:function(){return Object.create(ir)},__iterate:function(t,e){return E(this,t,e,!0)},__iterator:function(t,e){return j(this,t,e,!0)}},{from:function(t){if(t instanceof nr)return t;if(!Array.isArray(t)){if(p(t))return new or(t);if(g(t))return new hr(t);if(t&&t.constructor===Object)return new cr(t);t=[t]}return new fr(t)}});var ir=rr.prototype;ir[$e]=ir.entries,ir.toJSON=ir.toJS,ir.__toJS=ir.toObject,ir.inspect=ir.toSource=function(){return""+this},ir.chain=ir.flatMap;var ur=function(){Ee.defaultSuperCall(this,ar.prototype,arguments)},ar=ur;Ee.createClass(ur,{toString:function(){return this.__toString("Seq [","]")},concat:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];return V(this,t,!1)},filter:function(t,e){return W(this,t,e,!1)},findIndex:function(t,e){var r=this.findKey(t,e);return null==r?-1:r},indexOf:function(t){return this.findIndex(function(e){return Q(e,t)})},lastIndexOf:function(t){return this.toKeyedSeq().reverse().indexOf(t)},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=S(t,this.length);var n=this.slice(0,t);return 1===r?n:n.concat(a(arguments,2),this.slice(t+e))},findLastIndex:function(t,e){return this.toKeyedSeq().reverse().findIndex(t,e)},first:function(){return this.get(0)},flatten:function(){return N(this,!1)},flip:function(){return R(this.toKeyedSeq())},fromEntrySeq:function(){return new vr(this)},get:function(t,e){return t=C(this,t),0>t||1/0===this.length||null!=this.length&&t>this.length?e:this.find(function(e,r){return r===t},null,e)},groupBy:function(t,e){return K(this,t,e,!1)},has:function(t){return t=C(this,t),t>=0&&(null!=this.length?1/0===this.length||this.length>t:-1!==this.indexOf(t))},interpose:function(t){return T(this,t)},last:function(){return this.get(this.length?this.length-1:0)},skip:function(t){var e=this,r=B(e,t,!1);return r!==e&&(r.get=function(r,n){return r=C(this,r),r>=0?e.get(r+t,n):n
}),r},skipWhile:function(t,e){return L(this,t,e,!1)},sortBy:function(t,e){e=e||O;var r=this;return rr(this.entrySeq().toArray().sort(function(n,i){return e(t(n[1],n[0],r),t(i[1],i[0],r))||n[0]-i[0]})).fromEntrySeq().valueSeq()},take:function(t){var e=this,r=z(e,t);return r!==e&&(r.get=function(r,n){return r=C(this,r),r>=0&&t>r?e.get(r,n):n}),r},toKeyedSeq:function(){return new lr(this)},valueSeq:function(){return this},__makeSequence:function(){return Object.create(sr)},__iterate:function(t,e){return E(this,t,e,!1)},__iterator:function(t,e){return j(this,t,e,!1)}},{},rr);var sr=ur.prototype;sr[$e]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=M;var or=function(t){this._iterator=t,this._iteratorCache=[]};Ee.createClass(or,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r=this._iterator,n=this._iteratorCache,i=0;n.length>i;)if(t(n[i],i++,this)===!1)return i;for(var u;!(u=r.next()).done;){var a=u.value;if(n[i]=a,t(a,i++,this)===!1)break}return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new tr(function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return l(t,i,n[i++])})}},{},ur);var hr=function(t){this._iterable=t,this.length=t.length||t.size};Ee.createClass(hr,{__iterateUncached:function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=this._iterable,n=m(r),i=0;if(p(n))for(var u;!(u=n.next()).done&&t(u.value,i++,this)!==!1;);return i},__iteratorUncached:function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterable,n=m(r);if(!p(n))return new tr(function(){return v()});var i=0;return new tr(function(){var e=n.next();return e.done?e:l(t,i++,e.value)})}},{},ur);var cr=function(t){var e=Object.keys(t);this._object=t,this._keys=e,this.length=e.length};Ee.createClass(cr,{toObject:function(){return this._object},get:function(t,e){return void 0===e||this.has(t)?this._object[t]:e},has:function(t){return this._object.hasOwnProperty(t)},__iterate:function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,u=0;i>=u;u++){var a=n[e?i-u:u];
if(t(r[a],a,this)===!1)return u+1}return u},__iterator:function(t,e){var r=this._object,n=this._keys,i=n.length-1,u=0;return new tr(function(){var a=n[e?i-u:u];return u++>i?v():l(t,a,r[a])})}},{},rr);var fr=function(t){this._array=t,this.length=t.length};Ee.createClass(fr,{toArray:function(){return this._array},get:function(t,e){return this.has(t)?this._array[C(this,t)]:e},__iterate:function(t,e){for(var r=this._array,n=r.length-1,i=0;n>=i;i++)if(t(r[e?n-i:i],i,this)===!1)return i+1;return i},__iterator:function(t,e){var r=this._array,n=r.length-1,i=0;return new tr(function(){return i>n?v():l(t,i,r[e?n-i++:i++])})}},{},ur);var _r=function(t){this._seq=t,this.length=t.length};Ee.createClass(_r,{get:function(t,e){return this._seq.get(t,e)},has:function(t){return this._seq.has(t)},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=0;return this._seq.__iterate(function(e){return t(e,n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e),n=0;return new tr(function(){var e=r.next();return e.done?e:l(t,n++,e.value,e)})}},{},ur);var lr=function(t){this._seq=t,this.length=t.length};Ee.createClass(lr,{get:function(t,e){return this._seq.get(t,e)},has:function(t){return this._seq.has(t)},valueSeq:function(){return this._seq},reverse:function(){var t=this,e=P(this);return e.valueSeq=function(){return t._seq.reverse()},e},map:function(t,e){var r=this,n=U(this,t,e);return n.valueSeq=function(){return r._seq.map(t,e)},n},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this},__iterate:function(t,e){var r=this,n=e?y(this):0;return this._seq.__iterate(function(i){return t(i,e?--n:n++,r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e),n=e?y(this):0;return new tr(function(){var i=r.next();return i.done?i:l(t,e?--n:n++,i.value,i)})}},{},rr);var vr=function(t){this._seq=t,this.length=t.length};Ee.createClass(vr,{entrySeq:function(){return this._seq},cacheResult:function(){return this._seq.cacheResult(),this.length=this._seq.length,this

@@ -31,4 +31,4 @@ },__iterate:function(t,e){var r=this;return this._seq.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){var r=this._seq.__iterator(Xe,e);return new tr(function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n)return t===Ye?e:l(t,n[0],n[1],e)}})}},{},rr);var gr=function(t,e,r,n){n=n?n:t.getIn(e),this.length=n instanceof rr?n.length:null,this._rootData=t,this._keyPath=e,this._onChange=r};Ee.createClass(gr,{deref:function(t){return this._rootData.getIn(this._keyPath,t)},get:function(t,e){if(Array.isArray(t)&&0===t.length)return this;var r=this._rootData.getIn(this._keyPath.concat(t),We);return r===We?e:F(this,t,r)},set:function(t,e){return H(this,function(r){return r.set(t,e)},t)},remove:function(t){return H(this,function(e){return e.remove(t)},t)},clear:function(){return H(this,function(t){return t.clear()})},update:function(t,e,r){return 1===arguments.length?H(this,t):H(this,function(n){return n.update(t,e,r)},t)},withMutations:function(t){return H(this,function(e){return(e||pr.empty()).withMutations(t)})},cursor:function(t){return Array.isArray(t)&&0===t.length?this:G(this,t)},__iterate:function(t,e){var r=this,n=this.deref();return n&&n.__iterate?n.__iterate(function(e,n){return t(F(r,n,e),n,r)},e):0},__iterator:function(t,e){var r=this,n=this.deref(),i=n&&n.__iterator&&n.__iterator(Ye,e);return new tr(function(){if(!i)return v();var e=i.next();if(e.done)return e;var n=e.value,u=n[0],a=n[1];return l(t,u,F(r,u,a),e)})}},{},rr),gr.prototype[je]=gr.prototype.remove,gr.prototype.getIn=gr.prototype.get;var pr=function(t){var e=mr.empty();return t?t.constructor===mr?t:e.merge(t):e},mr=pr;Ee.createClass(pr,{toString:function(){return this.__toString("Map {","}")},get:function(t,e){return this._root?this._root.get(0,o(t),t,e):e},set:function(t,e){return $(this,t,e)},remove:function(t){return $(this,t,We)},update:function(t,e,r){return 1===arguments.length?this.updateIn([],null,t):this.updateIn([t],e,r)},updateIn:function(t,e,r){var n;return r||(n=[e,r],r=n[0],e=n[1],n),oe(this,t,e,r,0)

return t?t.constructor===Vr?t:e.union(t):e},fromKeys:function(t){return Vr.from(rr(t).flip())}},rr);var Nr=Lr.prototype;Nr[je]=Nr.remove,Nr[$e]=Nr.values,Nr.contains=Nr.has,Nr.mergeDeep=Nr.merge=Nr.union,Nr.mergeDeepWith=Nr.mergeWith=function(){for(var t=[],e=1;arguments.length>e;e++)t[e-1]=arguments[e];return this.merge.apply(this,t)},Nr.withMutations=dr.withMutations,Nr.asMutable=dr.asMutable,Nr.asImmutable=dr.asImmutable,Nr.__toJS=sr.__toJS,Nr.__toStringMapper=sr.__toStringMapper;var Tr,Fr=function(t){var e=Gr.empty();return t?t.constructor===Gr?t:e.merge(t):e},Gr=Fr;Ee.createClass(Fr,{toString:function(){return this.__toString("OrderedMap {","}")},get:function(t,e){var r=this._map.get(t);return null!=r?this._vector.get(r)[1]:e},clear:function(){return 0===this.length?this:this.__ownerID?(this.length=0,this._map.clear(),this._vector.clear(),this):Gr.empty()},set:function(t,e){return ke(this,t,e)},remove:function(t){return ke(this,t,We)},wasAltered:function(){return this._map.wasAltered()||this._vector.wasAltered()},__iterate:function(t,e){var r=this;return this._vector.__iterate(function(e){return e&&t(e[1],e[0],r)},e)},__iterator:function(t,e){return this._vector.fromEntrySeq().__iterator(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._vector.__ensureOwner(t);return t?xe(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._vector=r,this)}},{empty:function(){return Hr||(Hr=xe(pr.empty(),Ar.empty()))}},pr),Fr.from=Fr,Fr.prototype[je]=Fr.prototype.remove;var Hr,Qr=function(t,e){var r=function(t){return this instanceof r?void(this._map=pr(t)):new r(t)},n=Object.keys(t),i=r.prototype=Object.create(Yr);i.constructor=r,e&&(i._name=e),i._defaultValues=t,i._keys=n,i.length=n.length;try{rr(t).forEach(function(t,e){Object.defineProperty(r.prototype,e,{get:function(){return this.get(e)},set:function(t){s(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})})}catch(u){}return r},Xr=Qr;Ee.createClass(Qr,{toString:function(){return this.__toString(this._name+" {","}")
},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return Xr._empty||(Xr._empty=De(this,pr.empty()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:De(this,r)},remove:function(t){if(null==t||!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:De(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;return rr(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?De(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},rr);var Yr=Qr.prototype;Yr._name="Record",Yr[je]=Yr.remove,Yr.merge=dr.merge,Yr.mergeWith=dr.mergeWith,Yr.mergeDeep=dr.mergeDeep,Yr.mergeDeepWith=dr.mergeDeepWith,Yr.update=dr.update,Yr.updateIn=dr.updateIn,Yr.cursor=dr.cursor,Yr.withMutations=dr.withMutations,Yr.asMutable=dr.asMutable,Yr.asImmutable=dr.asImmutable;var Zr=function(t,e,r){return this instanceof $r?(s(0!==r,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&en?en:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new $r(t,e,r)},$r=Zr;Ee.createClass(Zr,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return t=C(this,t),this.has(t)?this._start+t*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)
},has:function(t){return this._defaultValues.hasOwnProperty(t)},get:function(t,e){return void 0===e||this.has(t)?this._map.get(t,this._defaultValues[t]):e},clear:function(){if(this.__ownerID)return this._map.clear(),this;Object.getPrototypeOf(this).constructor;return Xr._empty||(Xr._empty=De(this,pr.empty()))},set:function(t,e){if(!this.has(t))throw Error('Cannot set unknown key "'+t+'" on '+this._name);var r=this._map.set(t,e);return this.__ownerID||r===this._map?this:De(this,r)},remove:function(t){if(null==t||!this.has(t))return this;var e=this._map.remove(t);return this.__ownerID||e===this._map?this:De(this,e)},keys:function(){return this._map.keys()},values:function(){return this._map.values()},entries:function(){return this._map.entries()},wasAltered:function(){return this._map.wasAltered()},__iterator:function(t,e){return this._map.__iterator(t,e)},__iterate:function(t,e){var r=this;return rr(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},__ensureOwner:function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?De(this,e,t):(this.__ownerID=t,this._map=e,this)}},{},rr);var Yr=Qr.prototype;Yr._name="Record",Yr[je]=Yr.remove,Yr.merge=dr.merge,Yr.mergeWith=dr.mergeWith,Yr.mergeDeep=dr.mergeDeep,Yr.mergeDeepWith=dr.mergeDeepWith,Yr.update=dr.update,Yr.updateIn=dr.updateIn,Yr.cursor=dr.cursor,Yr.withMutations=dr.withMutations,Yr.asMutable=dr.asMutable,Yr.asImmutable=dr.asImmutable;var Zr=function(t,e,r){return this instanceof $r?(s(0!==r,"Cannot step a Range by 0"),t=t||0,null==e&&(e=1/0),t===e&&en?en:(r=null==r?1:Math.abs(r),t>e&&(r=-r),this._start=t,this._end=e,this._step=r,void(this.length=Math.max(0,Math.ceil((e-t)/r-1)+1)))):new $r(t,e,r)},$r=Zr;Ee.createClass(Zr,{toString:function(){return 0===this.length?"Range []":"Range [ "+this._start+"..."+this._end+(this._step>1?" by "+this._step:"")+" ]"},get:function(t,e){return this.has(t)?this._start+C(this,t)*this._step:e},contains:function(t){var e=(t-this._start)/this._step;return e>=0&&this.length>e&&e===Math.floor(e)
},slice:function(t,e){return w(t,e,this.length)?this:(t=S(t,this.length),e=I(e,this.length),t>=e?en:new $r(this.get(t,this._end),this.get(e,this._end),this._step))},indexOf:function(t){var e=t-this._start;if(e%this._step===0){var r=e/this._step;if(r>=0&&this.length>r)return r}return-1},lastIndexOf:function(t){return this.indexOf(t)},take:function(t){return this.slice(0,Math.max(0,t))},skip:function(t){return this.slice(Math.max(0,t))},__iterate:function(t,e){for(var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;r>=u;u++){if(t(i,u,this)===!1)return u+1;i+=e?-n:n}return u},__iterator:function(t,e){var r=this.length-1,n=this._step,i=e?this._start+r*n:this._start,u=0;return new tr(function(){var a=i;return i+=e?-n:n,u>r?v():l(t,u++,a)})},__deepEquals:function(t){return t instanceof $r?this._start===t._start&&this._end===t._end&&this._step===t._step:Ee.superCall(this,$r.prototype,"__deepEquals",[t])}},{},ur);var tn=Zr.prototype;tn.__toJS=tn.toArray,tn.first=jr.first,tn.last=jr.last;var en=Zr(0,0),rn=function(t,e){return 0===e&&an?an:this instanceof nn?(this._value=t,void(this.length=null==e?1/0:Math.max(0,e))):new nn(t,e)},nn=rn;Ee.createClass(rn,{toString:function(){return 0===this.length?"Repeat []":"Repeat [ "+this._value+" "+this.length+" times ]"},get:function(t,e){return this.has(t)?this._value:e},contains:function(t){return Q(this._value,t)},slice:function(t,e){var r=this.length;return t=0>t?Math.max(0,r+t):Math.min(r,t),e=null==e?r:e>0?Math.min(r,e):Math.max(0,r+e),e>t?new nn(this._value,e-t):an},reverse:function(){return this},indexOf:function(t){return Q(this._value,t)?0:-1},lastIndexOf:function(t){return Q(this._value,t)?this.length:-1},__iterate:function(t){for(var e=0;this.length>e;e++)if(t(this._value,e,this)===!1)return e+1;return e},__iterator:function(t){var e=this,r=0;return new tr(function(){return e.length>r?l(t,r++,e._value):v()})},__deepEquals:function(t){return t instanceof nn?Q(this._value,t._value):Ee.superCall(this,nn.prototype,"__deepEquals",[t])}},{},ur);var un=rn.prototype;
un.last=un.first,un.has=tn.has,un.take=tn.take,un.skip=tn.skip,un.__toJS=tn.__toJS;var an=new rn(void 0,0),sn={Sequence:rr,Map:pr,Vector:Ar,Stack:Kr,Set:Lr,OrderedMap:Fr,Record:Qr,Range:Zr,Repeat:rn,is:Q,fromJS:Me};return sn}"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):Immutable=t();
{
"name": "immutable",
"version": "2.3.1",
"version": "2.3.2",
"description": "Immutable Data Collections",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/facebook/immutable-js",

Sorry, the diff of this file is too big to display

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