Socket
Socket
Sign inDemoInstall

wait-for-stuff

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-for-stuff - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

4

index.js

@@ -199,3 +199,3 @@ ///////////////////////////////////////////////////////////

$wait.use('event', (emitter, eventName) => {
if (!(emitter instanceof EventEmitter)){
if (typeof emitter.on !== 'function' && typeof emitter.emit !== 'function'){
throw new Error('wait.for.event(..) :: invalid <emitter> argument ' + emitter);

@@ -205,3 +205,3 @@ }

if (typeof eventName !== 'string'){
throw new Error('wait.for.value(..) :: invalid <eventName> argument ' + eventName);
throw new Error('wait.for.event(..) :: invalid <eventName> argument ' + eventName);
}

@@ -208,0 +208,0 @@

{
"name": "wait-for-stuff",
"version": "1.3.0",
"version": "1.4.0",
"description": "an extendable library that can wait for stuff to happen in a synchronous-but-not-blocking manner",

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

@@ -25,4 +25,3 @@ [![Build Status](https://travis-ci.org/ujc/wait-for-stuff.svg?branch=master)](https://travis-ci.org/ujc/wait-for-stuff)

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
---

@@ -59,4 +58,2 @@ ## Table of Contents

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
---

@@ -84,5 +81,4 @@ ## <a id="why">[#](#why)</a> Why ?

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="install">[#](#install)</a> Install

@@ -95,5 +91,5 @@ ```

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="how-it-works">[#](#how-it-works)</a> How it works

@@ -106,4 +102,4 @@ Behind the scenes, `wait-for-stuff` uses [deasync](https://www.npmjs.com/package/deasync) to do it's magic.

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="built-in-waiters">[#](#built-in-waiters)</a> Built-in waiters

@@ -115,4 +111,4 @@ `wait-for-stuff` is designed to be *middleware-oriented* - which is just a fancy way of saying you can add your own "stuff" to "wait for" based on your own logic.

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-time">[#](#wait-for-time)</a>

@@ -129,4 +125,4 @@ **`wait.for.time(seconds)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-date">[#](#wait-for-date)</a>

@@ -148,4 +144,4 @@ **`wait.for.date(futureDateObject)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-event">[#](#wait-for-event)</a>

@@ -169,4 +165,4 @@ **`wait.for.event(emitter, eventName)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-predicate">[#](#wait-for-predicate)</a>

@@ -188,4 +184,4 @@ **`wait.for.predicate(fn)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-condition">[#](#wait-for-condition)</a>

@@ -198,4 +194,4 @@ **`wait.for.condition`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-promise">[#](#wait-for-promise)</a>

@@ -214,4 +210,4 @@ **`wait.for.promise(promise)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-generator">[#](#wait-for-generator)</a>

@@ -252,4 +248,4 @@ **`wait.for.generator(generator)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-stream">[#](#wait-for-stream)</a>

@@ -270,4 +266,4 @@ **`wait.for.stream(readableStream)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-callback">[#](#wait-for-callback)</a>

@@ -313,4 +309,4 @@ **`wait.for.callback(nodeAsyncFunction, ...params)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-function">[#](#wait-for-function)</a>

@@ -339,4 +335,4 @@ **`wait.for.function(customAsyncFunction, ...params)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-yield">[#](#wait-for-yield)</a>

@@ -375,4 +371,4 @@ **`wait.for.yield(generator, value)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-value">[#](#wait-for-value)</a>

@@ -397,4 +393,4 @@ **`wait.for.value(owner, property, valueToWaitFor)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-property">[#](#wait-for-property)</a>

@@ -419,4 +415,4 @@ **`wait.for.property(owner, property)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-array">[#](#wait-for-array)</a>

@@ -436,4 +432,4 @@ **`wait.for.array(array, value)`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
---

@@ -485,4 +481,4 @@ ## <a id="middleware">[#](#middleware)</a> Middleware

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
---

@@ -524,4 +520,4 @@ ## <a id="composition">[#](#composition)</a> Composition

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
<a id="wait-for-result">[#](#wait-for-result)</a>

@@ -555,4 +551,4 @@ **`wait.for.result(waitable))`**

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="contribute">[#](#contribute)</a> Contribute

@@ -566,4 +562,4 @@ I hope people will find this module helpful - either as an alternative to asynchronous flow-execution patterns such as `await\async` *(until it's official release at least)* - or as a supplement to go along with what ever you're all ready using.

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="test">[#](#test)</a> Test

@@ -577,6 +573,6 @@ ```

[//]: # (----------------------------------------------------)
[//]: # (----------------------------------------------------)
## <a id="related">[#](#related)</a> Related
* [deasync](https://www.npmjs.com/package/deasync)

@@ -0,0 +0,0 @@ var EventEmitter = require('events').EventEmitter;

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