New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

microboot

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microboot - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

test/data/errors/01_object.js

10

lib/run.js

@@ -9,2 +9,6 @@ var debug = require('debug')('microboot:run')

if (typeof callback !== 'function') {
throw new Error('Error running phases; invalid callback specified')
}
if (!next) {

@@ -26,5 +30,9 @@ debug('Boot completed.')

return next(function () {
return next(function (err) {
if (err) {
throw err
}
return run(remaining, callback)
})
}

2

package.json
{
"name": "microboot",
"version": "1.2.1",
"version": "1.2.2",
"description": "Boot up your app in wee little modules with the help of glob.",

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

@@ -69,2 +69,28 @@ # microboot

## Failing to initialise
If something screws up, you _should_ want to stop your app starting. If that's the case, you can throw an error during a step to stop things in their tracks.
For a _synchronous_ step, just go ahead and throw:
``` js
module.exports = function my_broken_api () {
throw new Error('Oh no! It\'s all gone wrong!')
}
```
For an _asynchronous_ step, return your error as the first argument of the callback:
``` js
module.exports = function my_broken_api (done) {
startUpApi(function (err) {
if (err) {
return done(err)
}
return done()
})
}
```
## Examples

@@ -71,0 +97,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