<commit_before>// Create new object with same values, but remapped keys

'use strict';

var f       = require('../../Function/functionalize')
  , forEach = require('./for-each').call;

module.exports = f(function (callback, scope) {
	var o = {};
	forEach(this, function (value, key) {
		o[callback.call(scope, key, value, this)] = value;
	}, this);
	return o;
});
<commit_msg>Support ordered iteration in keysMap<commit_after>// Create new object with same values, but remapped keys

'use strict';

var f       = require('../../Function/functionalize')
  , forEach = require('./for-each').call;

module.exports = f(function (callback, scope, compareFn, compareByKey) {
	var o = {};
	forEach(this, function (value, key) {
		o[callback.call(scope, key, value, this)] = value;
	}, this, compareFn, compareByKey);
	return o;
});

{'fraction_non_alphanumeric': 0.16727272727272727, 'fraction_numerical': 0.0, 'mean_word_length': 4.006060606060606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6410504', 'n_tokens_mistral': 264, 'n_tokens_neox': 261, 'n_words': 78}