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

fnflow

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fnflow - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

lib/flowTaskArgumentNullError.js

3

lib/fnFlow.js
var async = require('async');
var us = require('underscore');
var FlowTaskError = require('./flowTaskError');
var FlowTaskArgumentNullError = require('./FlowTaskArgumentNullError');

@@ -140,3 +141,3 @@ module.exports = {

var fnName = fn.name;
if(!receiver) throw new FlowTaskError(taskName, "Cannot call function '" + fn.name + "' on " + receiver);
if(!receiver) return cb(new FlowTaskArgumentNullError(taskName, receiverName, fnName));
fn = receiver[fnName];

@@ -143,0 +144,0 @@ if(!fn) throw new FlowTaskError(taskName, "Unknown symbol '" + fnName + "' must be either the name of a task, the name of data, or the name of a function on '" + receiverName + "'");

@@ -6,3 +6,3 @@ {

"author": "David Fenster <david@dfenster.com>",
"version": "0.1.6",
"version": "0.1.7",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

@@ -470,17 +470,13 @@ var util = require('util');

module.exports["undefined instance error"] = function(test){
try {
flow({
genreName: 'Fictiony'
}, {
getGenre: [Genre.getByName, 'genreName'],
getBooks: ['getGenre', 'getBooks']
}, function(err, results){
test.fail(null, null, "no error received");
});
} catch(e) {
flow({
genreName: 'Fictiony'
}, {
getGenre: [Genre.getByName, 'genreName'],
getBooks: ['getGenre', 'getBooks']
}, function(e, results){
test.ok(e, 'got an error');
test.equals(e.name, "FlowTaskError", "got FlowTaskError");
test.equals(e.message, "Flow error in 'getBooks': Cannot call function 'getBooks' on undefined", "error message match")
test.equals(e.name, "FlowTaskArgumentNullError", "got FlowTaskError");
test.equals(e.message, "Flow error in 'getBooks': Cannot call function 'getBooks' on null/undefined 'getGenre'", "error message match")
test.done();
}
});
}

@@ -487,0 +483,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