UNPKG

trading-signals

Version:

Technical indicators to run technical analysis with JavaScript / TypeScript.

7 lines 214 B
export function getShare(amount, total) { if (total === 0) { throw new Error('Cannot calculate share of a total of "0".'); } return (amount / total) * 100; } //# sourceMappingURL=getShare.js.map