Sha256: c7ea2fe80b3697d96f4bfaf36906d751071205aa793ea801392fd23b96358ab1
Contents?: true
Size: 508 Bytes
Versions: 22
Compression:
Stored size: 508 Bytes
Contents
import { isNumeric } from "@helpers/lang"; function castAttributeValue(value) { if (value === "false") { return false; } if (value === "true") { return true; } if (isNumeric(value)) { return parseInt(value, 10); } return value; } function isNode(o) { return typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string"; } export { castAttributeValue, isNode };
Version data entries
22 entries across 22 versions & 1 rubygems