(val)
| 89 | } |
| 90 | |
| 91 | function isScalar(val) { |
| 92 | return ( |
| 93 | typeof val === 'undefined' || |
| 94 | typeof val === 'string' || |
| 95 | typeof val === 'boolean' || |
| 96 | typeof val === 'number' || |
| 97 | val === null |
| 98 | ); |
| 99 | } |
| 100 | |
| 101 | function isPlainObject(obj) { |
| 102 | return typeof obj === 'object' && obj.constructor === Object && obj.toString() === '[object Object]'; |