UNPKG

react-occult

Version:

Layered Information Visualization based on React and D3

11 lines (9 loc) 224 B
const objectifyType = type => { if (type instanceof Function || typeof type === 'string') { return { type: type }; } else if (type === undefined) { return {}; } return type; }; export default objectifyType;