UNPKG

remotion

Version:

Render videos in React

22 lines 987 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateDimension = void 0; const validateDimension = (amount, nameOfProp) => { if (typeof amount !== 'number') { throw new Error(`The "${nameOfProp}" of a composition must be a number, but you passed a value of type ${typeof amount}`); } if (isNaN(amount)) { throw new TypeError(`The "${nameOfProp}" of a composition must not be NaN, but is NaN.`); } if (!Number.isFinite(amount)) { throw new TypeError(`The "${nameOfProp}" of a composition must be finite, but is ${amount}.`); } if (amount % 1 !== 0) { throw new TypeError(`The "${nameOfProp}" of a composition must be an integer, but is ${amount}.`); } if (amount <= 0) { throw new TypeError(`The "${nameOfProp}" of a composition must be positive, but got ${amount}.`); } }; exports.validateDimension = validateDimension; //# sourceMappingURL=validate-dimensions.js.map