UNPKG

react-gbajs

Version:

GBA emulator and wrapper for React

14 lines (10 loc) • 215 B
const isPrimitive = (val) => { if (val === null) { return true; } const t = typeof val; return ( t === 'number' || t === 'string' || t === 'boolean' || t === 'undefined' ); } export default isPrimitive;