MCPcopy
hub / github.com/animatedjs/animated / checkValidInputRange

Function checkValidInputRange

src/Interpolation.js:260–274  ·  view source on GitHub ↗
(arr: Array<number>)

Source from the content-addressed store, hash-verified

258}
259
260function checkValidInputRange(arr: Array<number>) {
261 invariant(arr.length >= 2, 'inputRange must have at least 2 elements');
262 for (var i = 1; i < arr.length; ++i) {
263 invariant(
264 arr[i] >= arr[i - 1],
265 /* $FlowFixMe(>=0.13.0) - In the addition expression below this comment,
266 * one or both of the operands may be something that doesn't cleanly
267 * convert to a string, like undefined, null, and object, etc. If you really
268 * mean this implicit string conversion, you can do something like
269 * String(myThing)
270 */
271 'inputRange must be monotonically increasing ' + arr
272 );
273 }
274}
275
276function checkInfiniteRange(name: string, arr: Array<number>) {
277 invariant(arr.length >= 2, name + ' must have at least 2 elements');

Callers 1

createMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…