Socket
Socket
Sign inDemoInstall

hoek

Package Overview
Dependencies
Maintainers
2
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoek - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

21

lib/index.js
// Load modules
var Fs = require('fs');
var Async = require('async');

@@ -338,22 +337,2 @@

exports.executeRequestHandlers = function (handlers, request, callback) {
callback = callback || function () { };
if (!handlers) {
return callback();
}
var list = (handlers instanceof Array ? handlers : [handlers]);
Async.forEachSeries(list, function (func, next) {
func(request, next);
},
function (err) {
return callback(err);
});
};
exports.loadDirModules = function (path, excludeFiles, target) { // target(filename, name, capName)

@@ -360,0 +339,0 @@

3

package.json
{
"name": "hoek",
"description": "General purpose node utilities",
"version": "0.3.0",
"version": "0.4.0",
"author": "Eran Hammer <eran@hueniverse.com> (http://hueniverse.com)",

@@ -18,3 +18,2 @@ "contributors":[

"dependencies": {
"async": "0.1.x"
},

@@ -21,0 +20,0 @@ "devDependencies": {

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

<a href="/walmartlabs/blammo"><img src="https://raw.github.com/walmartlabs/blammo/master/images/from.png" align="right" /></a>
![hoek Logo](https://raw.github.com/walmartlabs/hoek/master/images/hoek.png)
<a href="https://github.com/walmartlabs/blammo"><img src="https://raw.github.com/walmartlabs/blammo/master/images/from.png" align="right" /></a>
![hoek Logo](/images/hoek.png)

@@ -4,0 +4,0 @@ General purpose node utilities

@@ -387,56 +387,2 @@ // Load modules

describe('#executeRequestHandlers', function () {
var m1 = m2 = m3 = function (request, next) {
next();
};
var m4 = function (request, next) {
next(new Error());
};
var m5 = function (request, next) {
expect(true).to.equal(false); // Must not be called
};
it('should execute an array of functions in order', function (done) {
Hoek.executeRequestHandlers([m1, m2, m3], {}, function (err) {
expect(err).to.not.exist;
done();
});
});
it('should abort execution of an array of functions when error returned', function (done) {
Hoek.executeRequestHandlers([m1, m2, m3, m4, m5], {}, function (err) {
expect(err).to.exist;
done();
});
});
it('should do nothing on empty array', function (done) {
Hoek.executeRequestHandlers([], {}, function (err) {
expect(err).to.not.exist;
done();
});
});
it('should do nothing on null array', function (done) {
Hoek.executeRequestHandlers(null, {}, function (err) {
expect(err).to.not.exist;
done();
});
});
});
describe('#loadDirModules', function () {

@@ -443,0 +389,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