New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seamless-immutable

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seamless-immutable - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

2

bower.json
{
"name": "seamless-immutable",
"main": "seamless-immutable.js",
"version": "2.3.0",
"version": "2.3.1",
"homepage": "https://github.com/rtfeldman/seamless-immutable",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "seamless-immutable",
"version": "2.3.0",
"version": "2.3.1",
"description": "Immutable data structures for JavaScript which are backwards-compatible with normal JS Arrays and Objects.",

@@ -5,0 +5,0 @@ "main": "seamless-immutable.development.js",

@@ -198,2 +198,6 @@ seamless-immutable

#### 2.3.1
Fixes an IE and Firefox bug related to cloning Dates while preserving their prototypes.
#### 2.3.0

@@ -200,0 +204,0 @@

@@ -326,3 +326,3 @@ (function(){

} else if (obj instanceof Date) {
return makeImmutable(new Date(obj));
return makeImmutable(new Date(obj.getTime()));
} else {

@@ -329,0 +329,0 @@ // Don't freeze the object we were given; make a clone and use that.

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

!function(){"use strict";function a(a,b,c){Object.defineProperty(a,b,{enumerable:!1,configurable:!1,writable:!1,value:c})}function b(b){a(b,s,!0)}function c(a){return"object"==typeof a?null===a||a.hasOwnProperty(s):!0}function d(a){return!(null===a||"object"!=typeof a||a instanceof Array||a instanceof Date)}function e(a){var b=new Error(a);return b.__proto__=e,b}function f(a,c){b(a);return a}function g(b,c){var d=b[c];a(b,c,function(){return r(d.apply(b,arguments))})}function h(b){for(var c in w){var d=w[c];g(b,d)}a(b,"flatMap",i),a(b,"asObject",l),a(b,"asMutable",k);for(var e=0,h=b.length;h>e;e++)b[e]=r(b[e]);return f(b,v)}function i(a){if(0===arguments.length)return this;var b=[];for(var c in this){var d=a(this[c],c,this);d instanceof Array?b.push.apply(b,d):b.push(d)}return h(b)}function j(a){if(0===arguments.length)return this;a instanceof Array||(a=Array.prototype.slice.call(arguments));var b={};for(var c in this)-1===a.indexOf(c)&&(b[c]=this[c]);return q(b)}function k(a){var b,c,d=[];if(a&&a.deep)for(b=0,c=this.length;c>b;b++)d.push(m(this[b]));else for(b=0,c=this.length;c>b;b++)d.push(this[b]);return d}function l(a){"function"!=typeof a&&(a=function(a){return a});var b={};for(var c in this){var d=a(this[c],c,this),e=d[0],f=d[1];b[e]=f}return q(b)}function m(a){return a&&a.hasOwnProperty(s)?a.asMutable({deep:!0}):a}function n(a,b){for(var c in a)b[c]=a[c];return b}function o(a,b){function c(a,c,e){var h=r(c[e]),k=j&&j(a[e],h);f=f||void 0!==k||!a.hasOwnProperty(e)||h!==a[e]&&h===h,g[e]=k?k:i&&d(a[e])&&d(h)?a[e].merge(h,b):h}if(0===arguments.length)return this;if(null===a||"object"!=typeof a)throw new TypeError("Immutable#merge can only be invoked with objects or arrays, not "+JSON.stringify(a));var e,f=!1,g=n(this,{}),h=a instanceof Array,i=b&&b.deep,j=b&&b.merger;if(h)for(var k in a){var l=a[k];for(e in l)c(this,l,e)}else for(e in a)c(this,a,e);return f?q(g):this}function p(a){var b,c={};if(a&&a.deep)for(b in this)c[b]=m(this[b]);else for(b in this)c[b]=this[b];return c}function q(b){return a(b,"merge",o),a(b,"without",j),a(b,"asMutable",p),f(b,t)}function r(a){if(arguments.length>1)return h(Array.prototype.slice.call(arguments));if(c(a))return a;if(a instanceof Array)return h(a.slice());if(a instanceof Date)return f(new Date(a));var b={};for(var d in a)b[d]=r(a[d]);return q(b)}var s="__immutable_invariants_hold",t=["setPrototypeOf"],u=["keys"],v=t.concat(["push","pop","sort","splice","shift","unshift","reverse"]),w=u.concat(["map","filter","slice","concat","reduce","reduceRight"]);e.prototype=Error.prototype,r.isImmutable=c,r.ImmutableError=e,Object.freeze(r),"object"==typeof module?module.exports=r:"object"==typeof exports?exports.Immutable=r:"object"==typeof window?window.Immutable=r:"object"==typeof global&&(global.Immutable=r)}();
!function(){"use strict";function a(a,b,c){Object.defineProperty(a,b,{enumerable:!1,configurable:!1,writable:!1,value:c})}function b(b){a(b,s,!0)}function c(a){return"object"==typeof a?null===a||a.hasOwnProperty(s):!0}function d(a){return!(null===a||"object"!=typeof a||a instanceof Array||a instanceof Date)}function e(a){var b=new Error(a);return b.__proto__=e,b}function f(a,c){b(a);return a}function g(b,c){var d=b[c];a(b,c,function(){return r(d.apply(b,arguments))})}function h(b){for(var c in w){var d=w[c];g(b,d)}a(b,"flatMap",i),a(b,"asObject",l),a(b,"asMutable",k);for(var e=0,h=b.length;h>e;e++)b[e]=r(b[e]);return f(b,v)}function i(a){if(0===arguments.length)return this;var b=[];for(var c in this){var d=a(this[c],c,this);d instanceof Array?b.push.apply(b,d):b.push(d)}return h(b)}function j(a){if(0===arguments.length)return this;a instanceof Array||(a=Array.prototype.slice.call(arguments));var b={};for(var c in this)-1===a.indexOf(c)&&(b[c]=this[c]);return q(b)}function k(a){var b,c,d=[];if(a&&a.deep)for(b=0,c=this.length;c>b;b++)d.push(m(this[b]));else for(b=0,c=this.length;c>b;b++)d.push(this[b]);return d}function l(a){"function"!=typeof a&&(a=function(a){return a});var b={};for(var c in this){var d=a(this[c],c,this),e=d[0],f=d[1];b[e]=f}return q(b)}function m(a){return a&&a.hasOwnProperty(s)?a.asMutable({deep:!0}):a}function n(a,b){for(var c in a)b[c]=a[c];return b}function o(a,b){function c(a,c,e){var h=r(c[e]),k=j&&j(a[e],h);f=f||void 0!==k||!a.hasOwnProperty(e)||h!==a[e]&&h===h,g[e]=k?k:i&&d(a[e])&&d(h)?a[e].merge(h,b):h}if(0===arguments.length)return this;if(null===a||"object"!=typeof a)throw new TypeError("Immutable#merge can only be invoked with objects or arrays, not "+JSON.stringify(a));var e,f=!1,g=n(this,{}),h=a instanceof Array,i=b&&b.deep,j=b&&b.merger;if(h)for(var k in a){var l=a[k];for(e in l)c(this,l,e)}else for(e in a)c(this,a,e);return f?q(g):this}function p(a){var b,c={};if(a&&a.deep)for(b in this)c[b]=m(this[b]);else for(b in this)c[b]=this[b];return c}function q(b){return a(b,"merge",o),a(b,"without",j),a(b,"asMutable",p),f(b,t)}function r(a){if(arguments.length>1)return h(Array.prototype.slice.call(arguments));if(c(a))return a;if(a instanceof Array)return h(a.slice());if(a instanceof Date)return f(new Date(a.getTime()));var b={};for(var d in a)b[d]=r(a[d]);return q(b)}var s="__immutable_invariants_hold",t=["setPrototypeOf"],u=["keys"],v=t.concat(["push","pop","sort","splice","shift","unshift","reverse"]),w=u.concat(["map","filter","slice","concat","reduce","reduceRight"]);e.prototype=Error.prototype,r.isImmutable=c,r.ImmutableError=e,Object.freeze(r),"object"==typeof module?module.exports=r:"object"==typeof exports?exports.Immutable=r:"object"==typeof window?window.Immutable=r:"object"==typeof global&&(global.Immutable=r)}();

@@ -326,3 +326,3 @@ (function(){

} else if (obj instanceof Date) {
return makeImmutable(new Date(obj));
return makeImmutable(new Date(obj.getTime()));
} else {

@@ -329,0 +329,0 @@ // Don't freeze the object we were given; make a clone and use that.

@@ -134,3 +134,3 @@ var JSC = require("jscheck");

assert.notEqual(date, immutableDate);
assert.equal(date.toISOString(), immutableDate.toISOString());
assert.equal(date.getTime(), immutableDate.getTime());

@@ -144,3 +144,3 @@ var objectWithDate = {date: new Date()};

assert.notEqual(objectWithDate, immutableObjectWithDate);
assert.equal(objectWithDate.date.toISOString(), immutableObjectWithDate.date.toISOString());
assert.equal(objectWithDate.date.getTime(), immutableObjectWithDate.date.getTime());
});

@@ -147,0 +147,0 @@

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