zan compare
I needed a small lib to compare a shape of an object to predefined validation object. We were planning on using zan for propTypes so with this we could use zan to compare 2 objects and validate.
See zan for more info zan
Usage
compare(shape, data [, returnErrors:bool])
const zan = ;const compare = ; const recursive types = zan;const number string = types; const shape = ; const data = age: 32 name: 'Eisi Sig' emails: false; const isValid = ;// isValid = false, emails is expected to be an array