mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Remove semicolons.
This commit is contained in:
20
mapKeys.js
20
mapKeys.js
@@ -1,8 +1,8 @@
|
||||
import baseAssignValue from './.internal/baseAssignValue.js';
|
||||
import baseForOwn from './.internal/baseForOwn.js';
|
||||
import baseAssignValue from './.internal/baseAssignValue.js'
|
||||
import baseForOwn from './.internal/baseForOwn.js'
|
||||
|
||||
/**
|
||||
* The opposite of `mapValues`; this method creates an object with the
|
||||
* The opposite of `mapValues` this method creates an object with the
|
||||
* same values as `object` and keys generated by running each own enumerable
|
||||
* string keyed property of `object` thru `iteratee`. The iteratee is invoked
|
||||
* with three arguments: (value, key, object).
|
||||
@@ -16,16 +16,16 @@ import baseForOwn from './.internal/baseForOwn.js';
|
||||
* @example
|
||||
*
|
||||
* mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
|
||||
* return key + value;
|
||||
* });
|
||||
* return key + value
|
||||
* })
|
||||
* // => { 'a1': 1, 'b2': 2 }
|
||||
*/
|
||||
function mapKeys(object, iteratee) {
|
||||
const result = {};
|
||||
const result = {}
|
||||
baseForOwn(object, (value, key, object) => {
|
||||
baseAssignValue(result, iteratee(value, key, object), value);
|
||||
});
|
||||
return result;
|
||||
baseAssignValue(result, iteratee(value, key, object), value)
|
||||
})
|
||||
return result
|
||||
}
|
||||
|
||||
export default mapKeys;
|
||||
export default mapKeys
|
||||
|
||||
Reference in New Issue
Block a user