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

Method keysOfType

source/predicates/map.ts:109–114  ·  view source on GitHub ↗

Test all the keys in the Map to match the provided predicate. @param predicate - The predicate that should be applied against every key in the Map.

(predicate: BasePredicate<T1>)

Source from the content-addressed store, hash-verified

107 @param predicate - The predicate that should be applied against every key in the Map.
108 */
109 keysOfType(predicate: BasePredicate<T1>): this {
110 return this.addValidator({
111 message: (_, label, error) => `(${label}) ${error}`,
112 validator: map => ofType(map.keys(), 'keys', predicate),
113 });
114 }
115
116 /**
117 Test all the values in the Map to match the provided predicate.

Callers 1

map.tsFile · 0.80

Calls 2

ofTypeFunction · 0.85
addValidatorMethod · 0.80

Tested by

no test coverage detected