client/src/model.js
function isPrimitive(value) {
  if (value === null) {
    return true
  }
  if (value === undefined) {
    return false
  }
  if (typeof value === 'function') {
    return false
  }
  if ([ 'boolean', 'number', 'string' ].indexOf(typeof value) !== -1) {
    return true
  }
  if (value instanceof Date || value instanceof ArrayBuffer) {
    return true
  }
  return false
}
function isPrimitive(value) {
  if (value === null) {
    return true
  }
  if (value === undefined) {
    return false
  }
  if (typeof value === 'function') {
    return false
  }
  if ([ 'boolean', 'number', 'string' ].indexOf(typeof value) !== -1) {
    return true
  }
  if (value instanceof Date || value instanceof ArrayBuffer) {
    return true
  }
  return false
}
function isPrimitive ( value ) { if ( value === null ) { return true } if ( value === undefined ) { return false } if ( typeof value === 'function' ) { return false } if ( [ 'boolean' , 'number' , 'string' ] . indexOf ( typeof value ) !== - 1 ) { return true } if ( value instanceof Date || value instanceof ArrayBuffer ) { return true } return false }
Whether an object is primitive. We consider functions non-primitives, lump Dates and ArrayBuffers into primitives.
Whether an object is primitive . We consider functions non - primitives lump Dates and ArrayBuffers into primitives .