UNPKG

trading-signals

Version:

Technical indicators to run technical analysis with JavaScript / TypeScript.

13 lines 332 B
export function pushUpdate({ array, item, maxLength, replace }) { if (array.length > 0 && replace === true) { array[array.length - 1] = item; } else { array.push(item); } if (array.length > maxLength) { return array.shift(); } return null; } //# sourceMappingURL=pushUpdate.js.map