const { isArray } = Array ; const { prototype : ObjectDotPrototype , getPrototypeOf , create : ObjectCreate , defineProperty : ObjectDefineProperty , isExtensible , getOwnPropertyDescriptor , getOwnPropertyNames , getOwnPropertySymbols , preventExtensions , hasOwnProperty , } = Object ; const { push : ArrayPush , concat : ArrayConcat } = Array . prototype ; export { ArrayPush , ArrayConcat , isArray , getPrototypeOf , ObjectCreate , ObjectDefineProperty , ObjectDotPrototype , isExtensible , getOwnPropertyDescriptor , getOwnPropertyNames , getOwnPropertySymbols , preventExtensions , hasOwnProperty , } ; const OtS = { } . toString ; export function toString ( obj ) { if ( obj && obj . toString ) { return obj . toString ( ) ; } else if ( typeof obj === 'object' ) { return OtS . call ( obj ) ; } else { return obj + '' ; } } export function isUndefined ( obj ) { return obj === undefined ; } export function isFunction ( obj ) { return typeof obj === 'function' ; } const proxyToValueMap = new WeakMap ( ) ; export function registerProxy ( proxy , value ) { proxyToValueMap . set ( proxy , value ) ; } export const unwrap = ( replicaOrAny ) : any => proxyToValueMap . get ( replicaOrAny ) || replicaOrAny ; export type ProxyPropertyKey = string | symbol ;