code: function(input, onlyPrimitives, options) {
    if (
      typeof input === 'boolean' ||
      typeof input === 'number' ||
      typeof input === 'function' ||
      input === null ||
      input instanceof Date
    ) {
      return true;
    }
    if (typeof input === 'string' && input.indexOf('\n') === -1) {
      return true;
    }
  
    if (options.inlineArrays && !onlyPrimitives) {
      if (Array.isArray(input) && isSerializable(input[0], true, options)) {
        return true;
      }
    }
  
    return false;
  }
docs: Helper function to detect if an object can be directly serializable