code: function replacerFactory(opt) {
      function replacer(key, value) {
  
          if (typeof value === 'function') {
              if (opt.functionDetail) {
                  return value.toString()
              } else {
                  return `function ${value.name}() {...}`
              }
          }
          return value
      }
  
      return replacer
  }
docs: Created by moyu on 2017/8/4.