Sha256: 0622f205617ed220f1094787ea54b417902e11626e57d00498984cc0b196d941
Contents?: true
Size: 737 Bytes
Versions: 16
Compression:
Stored size: 737 Bytes
Contents
'use strict'; var Utils = Utils || {}; Utils.arrayHelpers = { removeItem: function(collection, findIdxFn) { var itemIdx = _.findIndex(collection, findIdxFn) collection.splice(itemIdx, 1); return collection; }, compare: function compare(left, right, iteratee) { return (left.length === right.length) && _.every(left, function(leftItem) { return _.some(right, function(rightItem) { if (_.exists(iteratee)) { return iteratee(leftItem) === iteratee(rightItem); } else { return leftItem === rightItem; } }); }); } }; Utils.stringHelpers = { isPresent: function(str) { return !(str||'').match(/^\s*$/); } };
Version data entries
16 entries across 16 versions & 1 rubygems