UNPKG

@cowwoc/requirements

Version:

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

26 lines 712 B
/** * An object and its size: If the object represents a collection, the size refers to the number of elements it * contains. If the object represents a string, the size corresponds to its length. * * @param value - the object * @param size - the value's size */ class ObjectAndSize { object; size; /** * Creates a new instance. * * @param object - the object * @param size - the object's size */ constructor(object, size) { this.object = object; this.size = size; } toString() { return `value: ${JSON.stringify(this.object, null, 2)}, size: ${this.size}`; } } export { ObjectAndSize }; //# sourceMappingURL=ObjectAndSize.mjs.map