Return an object with the same nominal type as obj,
but without any possible extra properties that exist on obj.
321626
static ObjectType getCanonicalInstance(ObjectType obj) {
    FunctionType ctor = obj.getConstructor();
    return ctor == null ? obj : ctor.getInstanceType();
  }
985781
def ensure_object(self, object_type):
        
        rv = self.find_object(object_type)
        if rv is None:
            self.obj = rv = object_type()
        return rv
957556
def get_obj_doc0(obj, alt="(no doc)"):
    """"""
    ret = obj.__doc__.strip().split("\n")[0] if obj.__doc__ is not None else alt
    return ret
969188
function( obj ){
      if( obj == null ){
        return obj;
      } if( $$.is.array(obj) ){
        return obj.slice();
      } else if( $$.is.plainObject(obj) ){
        return $$.util.clone( obj );
      } else {
        return obj;
      }
    }
761246
function (original) {
                var clone = {};
                var i, keys = Object.keys(original);

                for (i = 0; i < keys.length; i++) {
                    // copy each property into the clone
                    clone[keys[i]] = original[keys[i]];
                }

                return clone;
            }
19759
def copy(self):
        """"""
        rv = object.__new__(self.__class__)
        rv.__dict__.update(self.__dict__)
        rv.symbols = self.symbols.copy()
        return rv
1205164
def instance_default(self, obj):
        ''' 

        '''
        return self.property.themed_default(obj.__class__, self.name, obj.themed_values())
888609
function clone(object) {
  if (object === null || typeof object != "object") {
    return object;
  }
  const copy = object.constructor();
  for (const attr in object) {
    if (Object.prototype.hasOwnProperty.call(object, attr)) {
      copy[attr] = object[attr];
    }
  }

  return copy;
}
159205
function() {
    var obj = {};
    for (var type in this.prefs_) {
      if (this.prefs_.hasOwnProperty(type)) {
        obj[type] = this.prefs_[type].name;
      }
    }
    return obj;
  }
700360
def asobject(self):
        
        warnings.warn("'asobject' is deprecated. Use 'astype(object)'"
                      " instead", FutureWarning, stacklevel=2)
        return self.astype(object).values
78232
function isObject(obj) {
  const objType = typeof obj;
  return objType === 'object' && Boolean(obj) && !Array.isArray(obj);
}
1280196
def clone(src, **kwargs):
    """"""
    obj = object.__new__(type(src))
    obj.__dict__.update(src.__dict__)
    obj.__dict__.update(kwargs)
    return obj
919092
function(obj) {
            if (obj === null || obj === void 0)
                return false;

            return Object(obj) instanceof this || classOf(obj).linearizedTypes.lastIndexOf(this) != -1;
        }
353976
def copy(self, nominal=None, uncertainties=None):
        
        if nominal is None:
            nominal = self.nominal
        if uncertainties is None:
            uncertainties = self.uncertainties
        return self.__class__(nominal, uncertainties=uncertainties)
171013
def copy(self):
        """"""
        return Poly(self.A.copy(), self.dim, self.shape,
            self.dtype)
9005
def native_obj(self):
        """"""
        if self.__native is None:
            self.__native = self._get_object()

        return self.__native
709945
function cloneObj(obj, exclude) {
  var type = _typeof(obj);

  switch (type) {
    case 'undefined':
    case 'boolean':
    case 'nuber':
    case 'string':
    case 'function':
      return obj;
      break;

    case 'object':
      if (obj === null) {
        // null is object
        return obj;
      }

      var r;

      if (isArray(obj)) {
        r = [];
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = obj[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var item = _step3.value;
            r.push(cloneObj(item, exclude));
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      } else {
        r = {};

        for (var _i7 = 0, _Object$keys2 = Object.keys(obj); _i7 < _Object$keys2.length; _i7++) {
          var key = _Object$keys2[_i7];

          if (!exclude || isArray(exclude) && !exclude.includes(key) || !exclude(key, obj[key], obj)) {
            r[key] = cloneObj(obj[key], exclude);
          }
        }
      }

      return r;
      break;

    default:
      return obj;
      break;
  }
}