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

cnd

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cnd - npm Package Compare versions

Comparing version 4.1.6 to 4.2.0

57

lib/BITSNPIECES.js

@@ -753,4 +753,61 @@ // Generated by CoffeeScript 1.10.0

this.run = function(method, on_error, on_after_error) {
var trycatch, trycatch_settings;
if (on_error == null) {
on_error = null;
}
if (on_after_error == null) {
on_after_error = null;
}
/* Provide asynchronous error handling and long stacktraces. Usage:
To run a method, catch all the synchronous and asynchronous errors and print a stacktrace
to `process.stderr` (using `console.error`):
```coffee
CND.run -> f 42
```
Same as the above, but do the error handling yourself:
```coffee
CND.run ( -> f 42 ), ( error ) -> foobar()
```
Same as the last, except have CND output the error's stacktrace and be called back afterwards:
```coffee
CND.run ( -> f 42 ), null, ( error ) -> foobar()
```
NB.: `CND.run` may be made configurable in the future; as of now, it is hardwired to use colors
and always provide long (cross-event) stack traces. Colors used are blue for NodeJS VM built-ins,
green for errors originating from modules installed under `node_modules`, and yellow for everything
else.
*/
if (on_error == null) {
on_error = function(error) {
console.error(error['stack']);
if (on_after_error != null) {
return on_after_error(error);
}
};
}
trycatch = require('trycatch');
trycatch_settings = {
'long-stack-traces': true,
'colors': {
'node': 'blue',
'node_modules': 'green',
'default': 'yellow'
}
};
trycatch.configure(trycatch_settings);
trycatch(method, on_error);
return null;
};
}).call(this);
//# sourceMappingURL=BITSNPIECES.js.map

6

package.json
{
"name": "cnd",
"version": "4.1.6",
"version": "4.2.0",
"description": "a grab-bag NodeJS package mainly for functionalities that used to live in coffeenode-trm, coffeenode-bitsnpieces, and coffeenode-types",

@@ -28,3 +28,5 @@ "main": "lib/main.js",

"homepage": "https://github.com/loveencounterflow/cnd",
"dependencies": {},
"dependencies": {
"trycatch": "^1.5.21"
},
"devDependencies": {

@@ -31,0 +33,0 @@ "guy-test": "^1.3.1"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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