UNPKG

react-signal-forms

Version:

A forms library focusing on performance and modular extensibility.

28 lines 771 B
export function forAllKeysOf(obj, test) { return Object.keys(obj).every((key) => test(key)); } export function KeysOf(obj) { return Object.keys(obj); } export function forEachKeyOf(obj, action) { Object.keys(obj).forEach((key) => action(key)); } export function areEqualish(val1, val2) { if (val1 == null && val2 == null) { return true; } return val1 === val2; } export function arrayEquals(a, b) { return (Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((val, index) => val === b[index])); } export function ensureNotNull(name, value) { if (value == null) { throw new Error(`${name} should not be null.`); } return value != null; } //# sourceMappingURL=index.js.map