Socket
Socket
Sign inDemoInstall

sdk-base

Package Overview
Dependencies
8
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.0 to 3.4.0

6

History.md
3.4.0 / 2017-11-24
==================
**features**
* [[`98207ba`]](https://github.com/node-modules/sdk-base/pull/11/commits/98207ba521487df39f7c9b116aaf7163bb6b9ad8) - feat: add awaitFirst api (#11) (gxcsoccer <<gxcsoccer@126.com>>)
3.3.0 / 2017-09-17

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

2

index.js

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

const awaitEvent = require('await-event');
const awaitFirst = require('await-first');
const EventEmitter = require('events').EventEmitter;

@@ -36,2 +37,3 @@

this.await = awaitEvent;
this.awaitFirst = awaitFirst;

@@ -38,0 +40,0 @@ this.on('error', err => { this._defaultErrorHandler(err); });

18

package.json
{
"name": "sdk-base",
"version": "3.3.0",
"version": "3.4.0",
"description": "a base class for sdk with default error handler",

@@ -11,4 +11,5 @@ "main": "index.js",

"cov": "egg-bin cov",
"ci": "npm run lint && npm run cov",
"autod": "autod"
"ci": "npm run autod -- --check && npm run pkgfiles && npm run lint && npm run cov",
"autod": "autod",
"pkgfiles": "egg-bin pkgfiles --check"
},

@@ -34,2 +35,3 @@ "keywords": [

"await-event": "^2.1.0",
"await-first": "^1.0.0",
"co": "^4.6.0",

@@ -39,6 +41,6 @@ "is-type-of": "^1.2.0"

"devDependencies": {
"autod": "^2.9.0",
"egg-bin": "^4.3.2",
"autod": "^3.0.1",
"egg-bin": "^4.3.5",
"egg-ci": "^1.8.0",
"eslint": "^4.6.1",
"eslint": "^4.11.0",
"eslint-config-egg": "^5.1.1",

@@ -51,4 +53,4 @@ "pedding": "^1.1.0"

"ci": {
"version": "6, 8"
"version": "6, 8, 9"
}
}
}

@@ -135,4 +135,18 @@ sdk-base

- `.awaitFirst(event)`: [await the first event in a set of event pairs](https://github.com/node-modules/await-first), return a promise, and it will clean up after itself.
```js
co(function* () {
const o = yield client.awaitFirst([ 'foo', 'bar' ]);
if (o.event === 'foo') {
// ...
}
if (o.event === 'bar') {
// ...
}
});
```
### License
[MIT](LICENSE)
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