mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
committed by
John-David Dalton
parent
92a6575137
commit
b8dfb7cc14
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* The inverse of `toPairs`is method returns an object composed
|
||||
* The inverse of `entries`is method returns an object composed
|
||||
* from key-value `pairs`.
|
||||
*
|
||||
* @since 4.0.0
|
||||
@@ -8,10 +8,10 @@
|
||||
* @returns {Object} Returns the new object.
|
||||
* @example
|
||||
*
|
||||
* fromPairs([['a', 1], ['b', 2]])
|
||||
* fromEntries([['a', 1], ['b', 2]])
|
||||
* // => { 'a': 1, 'b': 2 }
|
||||
*/
|
||||
function fromPairs(pairs) {
|
||||
function fromEntries(pairs) {
|
||||
const result = {}
|
||||
if (pairs == null) {
|
||||
return result
|
||||
@@ -22,4 +22,4 @@ function fromPairs(pairs) {
|
||||
return result
|
||||
}
|
||||
|
||||
export default fromPairs
|
||||
export default fromEntries
|
||||
Reference in New Issue
Block a user