filepond
Version:
FilePond, where files go to stretch their bits.
24 lines (23 loc) • 609 B
JavaScript
/*!
* FilePond v5.0.2
* Copyright (c) 2017-2026 Pqina B.V.
* Released under the MIT License
* https://filepond.com
*/
import { getRuntimeDefaultLocale as i } from "./string.js";
import { isString as s, isArray as f } from "./test.js";
const a = {};
function u(m, t) {
let r, e;
const o = s(t) ? t : f(t) ? t.join(",") : i();
if (a[o])
[r, e] = a[o];
else {
const n = new Intl.NumberFormat(t);
r = n.format(1337).replace(/\d/g, ""), e = n.format(1.5).replace(/\d/g, ""), a[o] = [r, e];
}
return parseFloat(m.trim().split(r).join("").replace(e, "."));
}
export {
u as numberToFloat
};