- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
19 lines
552 B
JavaScript
19 lines
552 B
JavaScript
var keys = require('./keys.js');
|
|
var _cb = require('./_cb.js');
|
|
|
|
// Returns the results of applying the `iteratee` to each element of `obj`.
|
|
// In contrast to `_.map` it returns an object.
|
|
function mapObject(obj, iteratee, context) {
|
|
iteratee = _cb(iteratee, context);
|
|
var _keys = keys(obj),
|
|
length = _keys.length,
|
|
results = {};
|
|
for (var index = 0; index < length; index++) {
|
|
var currentKey = _keys[index];
|
|
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
|
|
}
|
|
return results;
|
|
}
|
|
|
|
module.exports = mapObject;
|