@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
25 lines (24 loc) • 768 B
JavaScript
import { decode as o } from "html-entities";
const s = (r) => typeof r == "boolean" ? r : typeof r == "string" ? r === "true" : !1, f = (r) => typeof r == "number" ? r : typeof r == "string" && parseInt(r) || 0, c = (r) => {
if (Array.isArray(r)) return r;
if (typeof r == "string") {
const t = decodeURIComponent(r);
if (t && t !== "undefined")
return JSON.parse(t);
}
return [];
}, d = (r) => r ? o(r) : "", u = (r) => r ? o(r) : "";
function p(r) {
return r.replace(/^\[|\]$/g, "").split(",").map((t) => {
const n = t.trim(), e = Number(n);
return isNaN(e) ? n : e;
});
}
export {
u as decodeHtmlEntitiesToHtml,
d as decodeHtmlEntitiesToText,
p as stringToArray,
s as toBoolean,
f as toNumber,
c as uriStringToArray
};