/** * Destroys this marshaller, closing all references and freeing all resources. * * @returns {Promise} Operation promise. */ destroy() { return P.map(_.values(this.refs), ref => ref.destroy()); }
/* Abstract _.values ======================================================================== */ _.withTest (['stdlib', 'values2'], function () { $assert (_.values2 (undefined), []) $assert (_.values2 (_.identity), [_.identity]) $assert (_.values2 ('foo'), ['foo']) $assert (_.values2 (['foo', 'bar']), ['foo', 'bar']) $assert (_.values2 ({ f: 'foo', b: 'bar' }), ['foo', 'bar']) }, function () { _.mixin ({ values2: function (x) { if (_.isArrayLike (x)) { return x } else if (_.isStrictlyObject (x)) { return _.values (x) } else if (_.isEmpty (x)) { return [] } else { return [x] } } }) })
var KeyValueMap = function() { var _map = Object.create(null); return { put: function(k, v) { _map[k] = v; }, get: function(k) { // TODO: Return an Option or similar? return _map[k]; }, remove: function(k) { delete _map[k]; }, filter: function(f) { return _.pick(_map, f); }, values: function() { return _.values(_map); } }; }
var ipAddress = _.first(_.values(ipAddresses[ipType]));
return P.map(_.values(this.resourceDefPromises), resource => { if (resource && _.isFunction(resource.destroy)) { return resource.destroy();
ringpop.isReady = true; var statuses = _.values(Member.Status);
return _.values(bigObj); });
_.each(_.values(proxyServers), function(proxyServer) { proxyServer.close(); proxyServer.http.close();
expect(_.values(metrics)).to.have.deep.members([ {count: 1}, {count: 1},
const hostsToSelect = _.values(hostsHistory).filter(function (hostHistory) { return !hostHistory.errors || ((Date.now() - hostHistory.lastErrorTime) > Math.pow(2, hostHistory.errors));
_.each(Array.prototype.concat.apply([], _.values(proxyServers)), function(proxyServer) { proxyServer.close(); proxyServer.http.close();
ringpop.isReady = true; var statuses = _.values(Member.Status);