@kabbi/react-redux-form
Version:
Create Forms Easily with React and Redux
19 lines (16 loc) • 371 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = partition;
function partition(collection, predicate) {
var result = [[], []];
collection.forEach(function (item, index) {
if (predicate(item, index, collection)) {
result[0].push(item);
} else {
result[1].push(item);
}
});
return result;
}