UNPKG

@cowwoc/requirements

Version:

A fluent API for enforcing design contracts with automatic message generation.

14 lines 541 B
import { internalValueToString } from "./internal.mjs"; /** * @param value - a value * @returns true if the value has the number of parameters expected by `StringMapper` */ function isStringMapper(value) { return typeof (value) === "function" && value.length >= 1 && value.length <= 2; } /** * Uses {@link internalValueToString} to convert objects to a string. */ const INTERNAL_VALUE_TO_STRING = (value) => internalValueToString(value); export { isStringMapper, INTERNAL_VALUE_TO_STRING }; //# sourceMappingURL=StringMapper.mjs.map