chore: release v4.0.0 - sync 550+ skills and restructure docs

This commit is contained in:
sck_0
2026-01-28 17:15:26 +01:00
parent 8c49211c70
commit 0ffee44828
683 changed files with 170528 additions and 588 deletions

View File

@@ -0,0 +1,24 @@
function stringifyNumber({ format, minFractionDigits, tag, value }) {
if (typeof value === 'bigint')
return String(value);
const num = typeof value === 'number' ? value : Number(value);
if (!isFinite(num))
return isNaN(num) ? '.nan' : num < 0 ? '-.inf' : '.inf';
let n = Object.is(value, -0) ? '-0' : JSON.stringify(value);
if (!format &&
minFractionDigits &&
(!tag || tag === 'tag:yaml.org,2002:float') &&
/^\d/.test(n)) {
let i = n.indexOf('.');
if (i < 0) {
i = n.length;
n += '.';
}
let d = minFractionDigits - (n.length - i - 1);
while (d-- > 0)
n += '0';
}
return n;
}
export { stringifyNumber };