Add .gitignore to exclude all node packages and lock files
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.validateFrame = void 0;
|
||||
const validateFrame = ({ allowFloats, durationInFrames, frame, }) => {
|
||||
if (typeof frame === 'undefined') {
|
||||
throw new TypeError(`Argument missing for parameter "frame"`);
|
||||
}
|
||||
if (typeof frame !== 'number') {
|
||||
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
||||
}
|
||||
if (!Number.isFinite(frame)) {
|
||||
throw new RangeError(`Frame ${frame} is not finite`);
|
||||
}
|
||||
if (frame % 1 !== 0 && !allowFloats) {
|
||||
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
||||
}
|
||||
if (frame < 0 && frame < -durationInFrames) {
|
||||
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
||||
}
|
||||
if (frame > durationInFrames - 1) {
|
||||
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
||||
}
|
||||
};
|
||||
exports.validateFrame = validateFrame;
|
||||
Reference in New Issue
Block a user