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.
		
		
		
		
			
				
					17 lines
				
				482 B
			
		
		
			
		
	
	
					17 lines
				
				482 B
			| 
											11 months ago
										 | 'use strict'; | ||
|  | var $ = require('../internals/export'); | ||
|  | var iterate = require('../internals/iterate'); | ||
|  | var createProperty = require('../internals/create-property'); | ||
|  | 
 | ||
|  | // `Object.fromEntries` method
 | ||
|  | // https://github.com/tc39/proposal-object-from-entries
 | ||
|  | $({ target: 'Object', stat: true }, { | ||
|  |   fromEntries: function fromEntries(iterable) { | ||
|  |     var obj = {}; | ||
|  |     iterate(iterable, function (k, v) { | ||
|  |       createProperty(obj, k, v); | ||
|  |     }, { AS_ENTRIES: true }); | ||
|  |     return obj; | ||
|  |   } | ||
|  | }); |