@hapi/teamwork
Advanced tools
Comparing version 3.3.1 to 4.0.0
@@ -13,3 +13,3 @@ /** | ||
export class Teamwork<Results extends any | any[] = void> { | ||
export class Team<Results extends any | any[] = void> { | ||
/** | ||
@@ -38,3 +38,1 @@ * Start a new team work. | ||
} | ||
export default Teamwork; |
@@ -6,4 +6,8 @@ 'use strict'; | ||
exports = module.exports = internals.Team = class { | ||
exports.Team = internals.Team = class { | ||
#meetings = null; | ||
#count = null; | ||
#notes = null; | ||
constructor(options) { | ||
@@ -23,5 +27,5 @@ | ||
const meetings = options.meetings || 1; | ||
this._meetings = meetings; | ||
this._count = meetings; | ||
this._notes = []; | ||
this.#meetings = meetings; | ||
this.#count = meetings; | ||
this.#notes = []; | ||
} | ||
@@ -35,9 +39,9 @@ | ||
this._notes.push(note); | ||
this.#notes.push(note); | ||
if (--this._count) { | ||
if (--this.#count) { | ||
return; | ||
} | ||
return this._resolve(this._meetings === 1 ? this._notes[0] : this._notes); | ||
return this._resolve(this.#meetings === 1 ? this.#notes[0] : this.#notes); | ||
} | ||
@@ -52,14 +56,1 @@ | ||
}; | ||
Object.defineProperties(internals.Team, { | ||
__esModule: { | ||
value: true | ||
}, | ||
default: { | ||
value: internals.Team | ||
}, | ||
Teamwork: { | ||
value: internals.Team | ||
} | ||
}); |
@@ -1,2 +0,2 @@ | ||
Copyright (c) 2015-2019, Sideway Inc, and project contributors | ||
Copyright (c) 2015-2020, Sideway Inc, and project contributors | ||
All rights reserved. | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "@hapi/teamwork", | ||
"description": "Wait for multiple callback", | ||
"version": "3.3.1", | ||
"version": "4.0.0", | ||
"repository": "git://github.com/hapijs/teamwork", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"keywords": [ | ||
@@ -12,10 +15,7 @@ "async", | ||
], | ||
"files": [ | ||
"lib" | ||
], | ||
"types": "lib/index.d.ts", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@hapi/code": "5.x.x", | ||
"@hapi/lab": "19.x.x" | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "22.x.x" | ||
}, | ||
@@ -22,0 +22,0 @@ "scripts": { |
<a href="http://hapijs.com"><img src="https://raw.githubusercontent.com/hapijs/assets/master/images/family.png" width="180px" align="right" /></a> | ||
# teamwork | ||
# @hapi/teamwork | ||
Wait for multiple callbacks | ||
[![Build Status](https://secure.travis-ci.org/hapijs/teamwork.png)](http://travis-ci.org/hapijs/teamwork) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104604
8
71
6