| var constant = require('./constant'), |
| createInverter = require('./_createInverter'), |
| identity = require('./identity'); |
| /** Used for built-in method references. */ |
| var objectProto = Object.prototype; |
| * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) |
| var nativeObjectToString = objectProto.toString; |
| * Creates an object composed of the inverted keys and values of `object`. |
| * If `object` contains duplicate values, subsequent values overwrite |
| * property assignments of previous values. |
| * @param {Object} object The object to invert. |
| * @returns {Object} Returns the new inverted object. |
| * var object = { 'a': 1, 'b': 2, 'c': 1 }; |
| * // => { '1': 'c', '2': 'b' } |
| var invert = createInverter(function(result, value, key) { |
| typeof value.toString != 'function') { |
| value = nativeObjectToString.call(value); |