You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					14 lines
				
				493 B
			
		
		
			
		
	
	
					14 lines
				
				493 B
			| 
											3 years ago
										 | // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
 | ||
|  | var has = require('./_has'); | ||
|  | var toObject = require('./_to-object'); | ||
|  | var IE_PROTO = require('./_shared-key')('IE_PROTO'); | ||
|  | var ObjectProto = Object.prototype; | ||
|  | 
 | ||
|  | module.exports = Object.getPrototypeOf || function (O) { | ||
|  |   O = toObject(O); | ||
|  |   if (has(O, IE_PROTO)) return O[IE_PROTO]; | ||
|  |   if (typeof O.constructor == 'function' && O instanceof O.constructor) { | ||
|  |     return O.constructor.prototype; | ||
|  |   } return O instanceof Object ? ObjectProto : null; | ||
|  | }; |