MCPcopy
hub / github.com/simple-icons/simple-icons / removeLeadingZeros

Function removeLeadingZeros

svglint.config.mjs:47–49  ·  view source on GitHub ↗
(numberOrString)

Source from the content-addressed store, hash-verified

45 * @returns {string} The number as a string without leading zeros.
46 */
47const removeLeadingZeros = (numberOrString) =>
48 // Convert 0.03 to '.03'
49 numberOrString.toString().replace(/^(-?)(0)(\.?.+)/v, '$1$3');
50/**
51 * Given three points, returns if the middle one (x2, y2) is collinear
52 * to the line formed by the two limit points.

Callers 1

svglint.config.mjsFile · 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…