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

letsfreezethat

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

letsfreezethat - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

lib/partial.js

55

lib/demo.js
(function() {
'use strict';
var d, e, error, fix, freeze, k, lets, thaw;
var d, e, error, fix, freeze, k, lets, log, thaw;
log = console.log;
({lets, freeze, thaw, fix} = require('..'));

@@ -141,2 +143,53 @@

log('--------------------------------------------------------------------');
({lets, freeze, thaw, fix} = require('..'));
d = {
x: 'some value'
};
Object.defineProperty(d, 'time', {
enumerable: true,
configurable: false,
get: function() {
return process.hrtime();
},
set: function() {
return log('set not implemented');
}
});
log('^887-1', d);
log('^887-2', d.time);
log('^887-3', d.time);
// d.x = 'some other value'
d.time = 42;
log('Object.getOwnPropertyDescriptor', Object.getOwnPropertyDescriptor(d, 'time'));
log('--------------------------------------------------------------------');
d = lets(d);
// log '^335-1', Object.isFrozen d
Object.freeze(d);
log('Object.getOwnPropertyDescriptor', Object.getOwnPropertyDescriptor(d, 'time'));
log('^887-4', d);
log('^887-5', d.time);
log('^887-6', d.time);
// d.x = 'some third value'
// d.time = 42
log('^887-7', d);
log('^887-8', d.time);
}).call(this);

5

lib/main.js

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

value = x[key];
R[key] = thaw(value);
R[key] = _thaw(value);
}

@@ -117,5 +117,6 @@ return R;

fix,
nofreeze: require('./nofreeze')
nofreeze: require('./nofreeze'),
partial: require('./partial')
};
}).call(this);
{
"name": "letsfreezethat",
"version": "2.0.0",
"version": "2.1.0",
"description": "An utterly minimal immutability library in the spirit of immer",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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