UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

20 lines (18 loc) 417 B
import { tryTo } from "./chunk-XAIHCZT4.mjs"; import { asString } from "./chunk-BDA5LB4S.mjs"; import { ofGet } from "./chunk-SJGQU3OG.mjs"; import { isNumber } from "./chunk-DEJ7A5PY.mjs"; // src/types/Number.ts var asNumber = (n, alt) => tryTo(() => asString(n)).map((s) => parseInt(s)).filter((n2) => isNumber(n2)).or(ofGet(alt) ?? NaN); export { asNumber }; //# sourceMappingURL=chunk-3FE4R6I2.mjs.map