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

dry-underscore

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dry-underscore - npm Package Compare versions

Comparing version 0.21.1 to 0.21.2

5

lib/common.js

@@ -828,3 +828,6 @@ "use strict";

running = true;
return f.apply(this, _.concat(function(){ running = false; }, _.a(arguments)));
var release = function(){ running = false; };
release.before = function(f){ return(function(){ release(); var ret = f.apply(this, arguments); return(ret); }); };
release.after = function(f){ return(function(){ var ret = f.apply(this, arguments); release(); return(ret); }); };
return f.apply(this, _.concat(release, _.a(arguments)));
}

@@ -831,0 +834,0 @@ }

@@ -249,2 +249,59 @@ "use strict";

test("lock.before", function(callback){
var rel = null;
var count = 0;
var before_count = 0;
var unlocked_f = function(release, one, two, three){ rel = release.before(function(){ before_count++; }); count++; eq(one, 1); eq(two, 2); eq(three, 3); return(5); }
var f = _.lock(unlocked_f);
_.nextTick(function(){
eq(5, f(1,2,3));
_.nextTick(function(){
eq(undefined, f());
_.nextTick(function(){
eq(undefined, f());
_.nextTick(function(){
rel();
eq(5, f(1,2,3));
eq(count, 2);
eq(before_count, 1);
callback();
});
});
});
});
});
test("lock.after", function(callback){
var rel = null;
var count = 0;
var after_count = 0;
var unlocked_f = function(release, one, two, three){ rel = release.after(function(){ after_count++; }); count++; eq(one, 1); eq(two, 2); eq(three, 3); return(5); }
var f = _.lock(unlocked_f);
_.nextTick(function(){
eq(5, f(1,2,3));
_.nextTick(function(){
eq(undefined, f());
_.nextTick(function(){
eq(undefined, f());
_.nextTick(function(){
rel();
eq(5, f(1,2,3));
eq(count, 2);
eq(after_count, 1);
callback();
});
});
});
});
});
test("iso_date", function(){

@@ -251,0 +308,0 @@ var now = _.date();

2

npm-shrinkwrap.json
{
"name": "dry-underscore",
"version": "0.21.1",
"version": "0.21.2",
"dependencies": {

@@ -5,0 +5,0 @@ "deep-diff": {

{
"name": "dry-underscore",
"version": "0.21.1",
"version": "0.21.2",
"main": "./index/node.index.js",

@@ -5,0 +5,0 @@ "description": "The DRY Undescore Library",

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