export const isRegExp = exp => {
  return exp instanceof RegExp;
};
export const isSerializedRegExp = exp => {
  return typeof exp === 'object' && exp !== null && Reflect.get(exp, '__regexp') === true;
};
export const serializeRegExp = exp => {
  const {
    source,
    flags
  } = exp;
  return {
    __regexp: true,
    source,
    flags
  };
};
export const deserializeRegExp = _ref => {
  let {
    source,
    flags
  } = _ref;
  return new RegExp(source, flags);
};