import _typeof from "@babel/runtime/helpers/typeof";
export var serializeValue = function serializeValue(value) {
  var valueType = _typeof(value);
  if (value === null) {
    return 'null';
  } else if (value === undefined) {
    return 'undefined';
  } else if (valueType === 'string' || valueType === 'number') {
    return value;
  } else if (valueType === 'symbol') {
    return value.toString();
  }
  // Calling toString of function returns whole function text with body.
  // So, just return function with name.
  else if (valueType === 'function') {
    return "function:".concat(value.name);
  } else if (valueType === 'object') {
    return {
      type: 'object',
      keys: Object.keys(value)
    };
  }
};