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

get-ready

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-ready - npm Package Compare versions

Comparing version 2.0.1 to 3.0.0

lib/index.d.ts

45

package.json
{
"name": "get-ready",
"version": "2.0.1",
"version": "3.0.0",
"description": "mixin to add one-time ready event callback handler",
"main": "index.js",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"index.js"
"lib"
],
"dependencies": {
"is-type-of": "^1.0.0"
"dependencies": {},
"devDependencies": {
"@eggjs/tsconfig": "^1.3.3",
"@types/mocha": "^10.0.1",
"@types/node": "^20.2.5",
"egg-bin": "^6.4.1",
"eslint": "^8.42.0",
"eslint-config-egg": "^12.2.1",
"typescript": "^5.1.3"
},
"engines": {
"node": ">= 4.0.0"
"node": ">= 16.13.0"
},
"devDependencies": {
"autod": "^2.7.1",
"egg": "^0.11.0",
"egg-bin": "^2.0.2",
"egg-ci": "^1.1.0",
"eslint": "^3.15.0",
"eslint-config-egg": "^3.2.0"
},
"scripts": {
"autod": "autod",
"lint": "eslint .",
"test": "npm run lint && egg-bin test",
"cov": "egg-bin cov",
"ci": "npm run lint && npm run cov"
"ci": "egg-bin cov && npm run tsc",
"clean": "tsc -b --clean",
"tsc": "tsc",
"prepublishOnly": "npm run tsc"
},
"repository": {
"type": "git",
"url": "git://github.com/node-modules/ready"
"url": "git://github.com/node-modules/get-ready"
},
"keywords": [
"ready",
"get-ready",
"once",
"event"
],
"author": "fengmk2 <m@fengmk2.com> (http://fengmk2.com)",
"author": "fengmk2 <fengmk2@gmail.com> (https://github.com/fengmk2)",
"license": "MIT",
"bugs": {
"url": "https://github.com/node-modules/ready/issues"
},
"ci": {
"version": "4, 6, 7"
"url": "https://github.com/node-modules/get-ready/issues"
}
}
# get-ready
=====
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url]

@@ -12,8 +8,2 @@

[npm-url]: https://npmjs.org/package/get-ready
[travis-image]: https://img.shields.io/travis/node-modules/ready.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/ready
[codecov-image]: https://codecov.io/github/node-modules/ready/coverage.svg?branch=master
[codecov-url]: https://codecov.io/github/node-modules/ready?branch=master
[david-image]: https://img.shields.io/david/node-modules/ready.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/ready
[download-image]: https://img.shields.io/npm/dm/get-ready.svg?style=flat-square

@@ -24,13 +14,13 @@ [download-url]: https://npmjs.org/package/get-ready

NodeJS mixin to add one-time ready event
one-time ready event object.
## Usage
Using `ready` or `ready.mixin` to add `ready` method to the given object.
Create `ready` event object.
```js
const ready = require('get-ready');
const obj = {};
ready.mixin(obj);
```ts
import Ready from 'get-ready';
const obj = new Ready();
// register a callback

@@ -49,3 +39,3 @@ obj.ready(() => console.log('ready'));

```js
```ts
obj.ready().then(() => console.log('ready'));

@@ -57,3 +47,3 @@ obj.ready(true);

```js
```ts
// already ready

@@ -72,3 +62,3 @@ obj.ready(true);

```js
```ts
obj.ready(true);

@@ -84,3 +74,3 @@ // call immediately

```js
```ts
obj.ready(err => console.log(err));

@@ -90,5 +80,4 @@ obj.ready(new Error('err'));

## License
[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