Fix bin/publish: use correct .env path for rspade_system Fix bin/publish script: prevent grep exit code 1 from terminating script 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
13 lines
407 B
JavaScript
Executable File
13 lines
407 B
JavaScript
Executable File
'use strict';
|
|
|
|
module.exports = function split(numberOfGroups) {
|
|
var itemsPerGroup = Math.round(this.items.length / numberOfGroups);
|
|
var items = JSON.parse(JSON.stringify(this.items));
|
|
var collection = [];
|
|
|
|
for (var iterator = 0; iterator < numberOfGroups; iterator += 1) {
|
|
collection.push(new this.constructor(items.splice(0, itemsPerGroup)));
|
|
}
|
|
|
|
return new this.constructor(collection);
|
|
}; |