2018-01-03 04:05:53 +00:00
|
|
|
// Copyright IBM Corp. 2017,2018. All Rights Reserved.
|
2017-04-10 08:36:49 +00:00
|
|
|
// Node module: loopback
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const Promise = require('bluebird');
|
|
|
|
|
|
|
|
function waitForEvent(emitter, event) {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
emitter.on(event, resolve);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = waitForEvent;
|
|
|
|
|