Socket
Socket
Sign inDemoInstall

finally

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

finally - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

3

index.js

@@ -68,4 +68,5 @@ /*

if (!seq || !(seq = seq[0])) return;
if (!args || !args.length) args = [undefined];
this._length = args.length;
if (args) forEach(args, function(arg) {
forEach(args, function(arg) {
seq(error, arg);

@@ -72,0 +73,0 @@ });

{
"name": "finally",
"version": "0.0.2",
"version": "0.0.3",
"description": "sane flow control library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -130,2 +130,40 @@ "use strict"

it('should go to the next sequential on empty spreads', function() {
flow(function(err) {
this.spread(null, [])
}).then(function(error, number) {
expect(error).to.be(null)
expect(number).to.be(undefined)
this.done(null, 10);
}).finally(function(error, number) {
expect(number).to.be(10);
})
flow(function(err) {
this.spread(null)
}).then(function(error, number) {
expect(error).to.be(null)
expect(number).to.be(undefined)
this.done(null, 10);
}).finally(function(error, number) {
expect(number).to.be(10);
})
})
it('should spread objects with a length', function() {
flow(function(err) {
this.spread(null, "yes")
}).then(function(error, letter) {
expect(error).to.be(null)
this.done(null, letter);
}).finally(function(error, y, e, s) {
expect(error).to.be(null)
expect(y + e + s).to.eql("yes")
})
})
})

@@ -132,0 +170,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