package.dist.is.es.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
A collection of utility functions for animations.
const isNumber = (value) => typeof value === "number";
const isString = (value) => typeof value === "string";
const isEasingGenerator = (easing) => typeof easing === "object" &&
Boolean(easing.createAnimation);
const isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);
const isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);
export { isCubicBezier, isEasingGenerator, isEasingList, isNumber, isString };