Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Baobab-React Type Checking
* ===========================
*
* Some helpers to perform runtime validations.
*/
var Baobab = require('baobab');
var Cursor = Baobab.Cursor;
var type = {};
type.object = function(value) {
return value &&
typeof value === 'object' &&
!Array.isArray(value) &&
!(value instanceof Date) &&
!(value instanceof RegExp);
};
type.baobab = function(value) {
return value instanceof Baobab;
};
type.cursor = function(value) {