UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

42 lines (41 loc) 850 B
import { ofConstruct } from "../chunk-PF7HDF6B.mjs"; import "../chunk-IXK47WKF.mjs"; import "../chunk-PIRWVOO2.mjs"; import { isArray, isBoolean, isNumber, isObject, isString } from "../chunk-AAND4MKF.mjs"; import "../chunk-4N72FQFX.mjs"; // src/utils/IfType.ts function ifType(o, predicate, f, alt) { return predicate(o) ? ofConstruct(f, o) : ofConstruct(alt); } function ifString(o, f, alt) { return ifType(o, isString, f, alt); } function ifNumber(o, f, alt) { return ifType(o, isNumber, f, alt); } function ifBoolean(o, f, alt) { return ifType(o, isBoolean, f, alt); } function ifArray(o, f, alt) { return ifType(o, isArray, f, alt); } function ifObject(o, f, alt) { return ifType(o, isObject, f, alt); } export { ifArray, ifBoolean, ifNumber, ifObject, ifString, ifType }; //# sourceMappingURL=IfType.mjs.map