UNPKG

svf

Version:

A simple validate form and React-based implementation

17 lines (15 loc) 427 B
const Util = { isArray (obj) { return (typeof obj === "object") && (obj instanceof Array); }, isEmpetyObject (obj) { if (obj && typeof obj === "object") { return Object.keys(obj).length === 0; } return false; }, isPlainObject (obj) { return typeof obj === "object" && obj != null && !(obj instanceof Array); } }; export default Util;