UNPKG

mockttp

Version:

Mock HTTP server for testing HTTP clients and stubbing webservices

13 lines 481 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.filter = filter; exports.objectAllPromise = objectAllPromise; const _ = require("lodash"); async function filter(array, test) { let testResults = await Promise.all(array.map(test)); return array.filter((v, i) => testResults[i]); } async function objectAllPromise(obj) { return _.zipObject(Object.keys(obj), await Promise.all(Object.values(obj))); } //# sourceMappingURL=promise.js.map