@ldrick/trade-indicators
Version:
Trade Indicators
12 lines (11 loc) • 370 B
JavaScript
/**
* Error for `Array.length` not at least as required.
* @internal
*/
export class NotEnoughDataError extends Error {
constructor(given, required) {
super(`Need at least ${required.toLocaleString()} values, but got ${given.toLocaleString()}`);
this.name = 'NotEnoughDataError';
Object.setPrototypeOf(this, new.target.prototype);
}
}