UNPKG

cluedin-widget

Version:

This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.

19 lines (16 loc) 598 B
var type = require( "../type" ); module.exports = function( value ) { var empty = false; if ( type( value ) === "null" || type( value ) === "undefined" ) { empty = true; } else if ( type( value ) === "object" ) { empty = Object.keys( value ).length === 0; } else if ( type( value ) === "boolean" ) { empty = value === false; } else if ( type( value ) === "number" ) { empty = value === 0 || value === -1; } else if ( type( value ) === "array" || type( value ) === "string" ) { empty = value.length === 0; } return empty; };