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.6.2 to 0.7.0

13

lib/index.js

@@ -326,14 +326,13 @@ // Load modules

}
else {
var stack = hideStack ? '' : exports.displayStack(1).join('\n\t');
console.log('ABORT: ' + message + '\n\t' + stack);
process.exit(1);
}
var stack = hideStack ? '' : exports.displayStack(1).join('\n\t');
console.log('ABORT: ' + message + '\n\t' + stack);
process.exit(1);
};
exports.assert = function (condition, message, hideStack) {
exports.assert = function (condition, message) {
if (!condition) {
exports.abort(message, hideStack);
throw new Error(message || 'Unknown error');
}

@@ -340,0 +339,0 @@ };

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

@@ -6,0 +6,0 @@ "contributors":[

@@ -458,27 +458,2 @@ // Load modules

});
it('should respect hideStack argument', function (done) {
var env = process.env.NODE_ENV;
var write = process.stdout.write;
var exit = process.exit;
var output = '';
process.exit = function () {};
process.env.NODE_ENV = '';
process.stdout.write = function (message) {
output = message;
};
Hoek.assert(false, 'my error message', true);
process.env.NODE_ENV = env;
process.stdout.write = write;
process.exit = exit;
expect(output).to.equal('ABORT: my error message\n\t\n');
done();
});
});

@@ -485,0 +460,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