This repository has been archived on 2025-07-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
eternos/frontend/style/node_modules/d3-shape/src/path.js
2025-01-11 09:54:09 +03:00

20 lines
393 B
JavaScript

import {Path} from "d3-path";
export function withPath(shape) {
let digits = 3;
shape.digits = function(_) {
if (!arguments.length) return digits;
if (_ == null) {
digits = null;
} else {
const d = Math.floor(_);
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
digits = d;
}
return shape;
};
return () => new Path(digits);
}