UNPKG

plate-data-transfer

Version:

Rearranging plate-layouts according to liquid handling steps

25 lines 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function* getGeneratorOfTransferInstructions(instructions) { let instructionChunk = []; const instructionChunks = []; let curDest = instructions[0]["Destination Plate"]; let curSrc = instructions[0]["Source Plate"]; instructions.forEach((cur) => { if (curDest === cur["Destination Plate"] && curSrc === cur["Source Plate"]) { instructionChunk.push(cur); } else { instructionChunks.push(instructionChunk); instructionChunk = []; curDest = instructions[0]["Destination Plate"]; curSrc = instructions[0]["Source Plate"]; } }); while (instructionChunks.length) { yield instructionChunks.pop(); } } exports.default = getGeneratorOfTransferInstructions; //# sourceMappingURL=getNextTransferInstructionsChunck.js.map