Bump to v4.17.5.

This commit is contained in:
John-David Dalton
2018-02-02 21:11:07 -08:00
parent 528e134995
commit edff3e8d25
16 changed files with 130 additions and 34 deletions

View File

@@ -2,6 +2,16 @@ import constant from './constant.js';
import createInverter from './_createInverter.js';
import identity from './identity.js';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
@@ -21,6 +31,11 @@ import identity from './identity.js';
* // => { '1': 'c', '2': 'b' }
*/
var invert = createInverter(function(result, value, key) {
if (value != null &&
typeof value.toString != 'function') {
value = nativeObjectToString.call(value);
}
result[value] = key;
}, constant(identity));