UNPKG

642 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.isCurveArray = void 0;
4var is_normalized_array_1 = require("./is-normalized-array");
5/**
6 * Iterates an array to check if it's a `PathArray`
7 * with all C (cubic bezier) segments.
8 *
9 * @param {string | PathArray} path the `Array` to be checked
10 * @returns {boolean} iteration result
11 */
12function isCurveArray(path) {
13 return (0, is_normalized_array_1.isNormalizedArray)(path) && path.every(function (_a) {
14 var pc = _a[0];
15 return 'MC'.includes(pc);
16 });
17}
18exports.isCurveArray = isCurveArray;
19//# sourceMappingURL=is-curve-array.js.map
\No newline at end of file