Loading docs…
Loading docs…
Guard for plain-object records with guards for keys and values. The key guard limits which keys may be present; it does not require every key represented by its type.
import { recordOf, isString, isNumber } from 'is-kit';const isStringNumberRecord = recordOf(isString, isNumber);isStringNumberRecord({ a: 1, b: 2 }); // trueisStringNumberRecord({ a: 'x' }); // false