code: function o(mod) {
    if (!(mod instanceof Module)) {
      throw(Error("Must supply a module to o: " + JSON.stringify(mod)))
    }
  
    var makeOFunc = function(isMain) {
      let o_ = function() { // takes (datum, targetType, args...)
        let prevStackTraceLimit = Error.stackTraceLimit
        try {
          Error.stackTraceLimit = getStackTraceLimit()
          var datum = arguments[0]
          var targetType
          var args
          if (arguments.length > 1) {
            targetType = arguments[1]
          }
          if (arguments.length > 2) { // the rest are constructor args
            var argumentsArray = Array.prototype.slice.call(arguments);
            args = argumentsArray.slice(2)
          }
  
          return atom.make(datum, targetType, args, false, mod, isMain);
        } finally {
          Error.stackTraceLimit = prevStackTraceLimit
        }
      }
      Object.defineProperty(o_, 'name', {
        configurable: false,
        enumerable: false,
        writable: false,
        value: 'o'
      })
      return o_
    }
  
    var result = makeOFunc(false)
    result.reset = reset
    result.main = makeOFunc(true)
    result.main.reset = reset
  
    return result
  }
docs: *************************************************************************************************
  @typedef {atom.ObjectInstantiationFunction} ObjectInstantiationFunctions
  @memberof atom
  @description The object instantiation function
  @property {atom.ObjectInstantiationFunctionMain} ObjectInstantiationFunctionMain
  @description The main version of the object instantiation function
   *************************************************************************************************
  @method o
  @memberof atom
  @description A factory function that returns an instantiation function ``o`` where ``o.main`` is
  used to execute the "main" handler if in the appropriate context (where ``require.main``
  == ``module``)
  @param {Module} mod -- The module whose context the resulting function should execute in. This
  is used to determine whether "main" should be executed if the returned
  function's "main" property is used to construct an object and to aid in
  resolving the objects "type".
  @returns {atom.ObjectInstantiationFunctions}