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

ready-callback

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ready-callback - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

6

HISTORY.md
2.1.0 / 2018-08-21
==================
**features**
* [[`37bd48f`](http://github.com/node-modules/ready-callback/commit/37bd48fe923982169d98f402a8e6bf3e5c7efc8a)] - feat: add lazyStart option (#113) (killa <<killa123@126.com>>)
2.0.1 / 2017-02-13

@@ -3,0 +9,0 @@ ==================

@@ -24,2 +24,3 @@ 'use strict';

* - {Boolean} [isWeakDep=false] - whether it's a weak dependency
* - {Boolean} [lazyStart=false] - will not check cache size automatically, if lazyStart is true
*/

@@ -34,2 +35,8 @@ constructor(opt) {

if (!this.opt.lazyStart) {
this.start();
}
}
start() {
setImmediate(() => {

@@ -36,0 +43,0 @@ // fire callback directly when no registered ready callback

5

package.json
{
"name": "ready-callback",
"version": "2.0.1",
"version": "2.1.0",
"description": "Launch server after all async task ready",

@@ -23,3 +23,3 @@ "keywords": [

"autod": "^2.7.1",
"egg-bin": "^2.0.2",
"egg-bin": "^1.11.1",
"egg-ci": "^1.1.0",

@@ -29,2 +29,3 @@ "eslint": "^3.15.0",

"koa": "^1.2.4",
"mz-modules": "^2.1.0",
"spy": "^1.0.0"

@@ -31,0 +32,0 @@ },

@@ -134,4 +134,19 @@ # ready-callback

### lazyStart
You can set a ready-callback object to lazyStart. It will not check
ready status immediately, and should start manualy to check ready
status.
```js
var ready = require('ready-callback')({ lazyStart: true });
yield sleep(1);
// ready obj is not ready
ready.start();
yield sleep(1);
// ready obj is ready now
```
## LISENCE
Copyright (c) 2015 popomore. Licensed under the MIT license.
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