MCPcopy
hub / github.com/sindresorhus/ow / size

Method size

source/predicates/map.ts:20–25  ·  view source on GitHub ↗

Test a Map to have a specific size. @param size - The size of the Map.

(size: number)

Source from the content-addressed store, hash-verified

18 @param size - The size of the Map.
19 */
20 size(size: number): this {
21 return this.addValidator({
22 message: (map, label) => `Expected ${label} to have size \`${size}\`, got \`${map.size}\``,
23 validator: map => map.size === size,
24 });
25 }
26
27 /**
28 Test an Map to have a minimum size.

Callers 2

map.tsFile · 0.45
set.tsFile · 0.45

Calls 1

addValidatorMethod · 0.80

Tested by

no test coverage detected