This repository has been archived on 2026-03-28. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
StasisWarden-Legacy/node_modules/es-toolkit/dist/compat/util/toString.mjs
T

19 lines
388 B
JavaScript

function toString(value) {
if (value == null) {
return '';
}
if (typeof value === 'string') {
return value;
}
if (Array.isArray(value)) {
return value.map(toString).join(',');
}
const result = String(value);
if (result === '0' && Object.is(Number(value), -0)) {
return '-0';
}
return result;
}
export { toString };