Socket
Socket
Sign inDemoInstall

after-ready

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "after-ready",
"version": "1.0.3",
"version": "1.0.4",
"description": "TC39 decorators for making classes to support one-time ready event callback handlers.",

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

@@ -58,6 +58,9 @@ [![Build Status](https://travis-ci.org/kaelzhang/after-ready.svg?branch=master)](https://travis-ci.org/kaelzhang/after-ready)

}
const result = await new Foo().doSomething()
console.log(result) // 1
```
## @setup
## @setup(onReady)
## `@setup`
## `@setup(onReady)`

@@ -70,3 +73,3 @@ - **onReady** `Function(err, ...args)` The function to be called when the instance of the class is set as ready or errored.

### [SET_READY](...args)
### `[SET_READY](...args)`

@@ -79,3 +82,3 @@ Set the class instance as ready.

### [SET_ERROR](error)
### `[SET_ERROR](error)`

@@ -88,7 +91,7 @@ Set the class instance as error encountered.

### [RESET_READY]()
### `[RESET_READY]()`
Reset the ready status, or reset the error status.
## @awaitReady
## `@awaitReady`

@@ -130,3 +133,3 @@ The method applied which this decorator will always returns a `Promise`.

## @whenReady
## `@whenReady`

@@ -133,0 +136,0 @@ If no `this[SET_READY]()` or `this[SET_ERROR](error)` has been called, the original method will never be invoked.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc