diff --git a/docs/index.html b/docs/index.html index 0697e2d..0e90cd9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -136,19 +136,8 @@
function mapKeys(callbackFn, thisArg) {
- assert(isObject(this), 'this is not an object');
- assert(isCallable(callbackFn), 'callback is not a function');
- const Ctor = SpeciesConstructor(this, Map);
- const retObj = new Ctor();
- const _set = retObj.set;
- for(const [key, value] of this) {
- const newKey = Reflect.apply(callbackFn, thisArg, [value, key, this])
- Reflect.apply(_set, retObj, [newKey, value]);
- }
- return retObj;
-}
Map.prototype.set
through Map
constructor, but that would break convention set by Map.groupBy
.
+
-function mapKeys(callbackFn, thisArg) {
- assert(isObject(this), 'this is not an object');
- assert(isCallable(callbackFn), 'callback is not a function');
- const Ctor = SpeciesConstructor(this, Map);
- const retObj = new Ctor();
- const _set = retObj.set;
- for(const [key, value] of this) {
- const newKey = Reflect.apply(callbackFn, thisArg, [value, key, this])
- Reflect.apply(_set, retObj, [newKey, value]);
- }
- return retObj;
-}
-
+