UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

21 lines (20 loc) 628 B
"use client"; import { toHexadecimal as a } from "./to-hexadecimal.js"; import { toDecimal as c } from "./to-decimal.js"; import { toNamed as f } from "./to-named.js"; function u(m, l, e) { let r = a(m, l, e.omitOptionalSemicolons), t; if ((e.useNamedReferences || e.useShortestReferences) && (t = f( m, l, e.omitOptionalSemicolons, e.attribute )), (e.useShortestReferences || !t) && e.useShortestReferences) { const i = c(m, l, e.omitOptionalSemicolons); i.length < r.length && (r = i); } return t && (!e.useShortestReferences || t.length < r.length) ? t : r; } export { u as formatSmart };