mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-09 13:41:11 +00:00
.
This commit is contained in:
parent
a004f0ae58
commit
fc725ba36b
7280 changed files with 19 additions and 1796407 deletions
42
node_modules/lodash/invert.js
generated
vendored
42
node_modules/lodash/invert.js
generated
vendored
|
@ -1,42 +0,0 @@
|
|||
var constant = require('./constant'),
|
||||
createInverter = require('./_createInverter'),
|
||||
identity = require('./identity');
|
||||
|
||||
/** 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
|
||||
* property assignments of previous values.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.7.0
|
||||
* @category Object
|
||||
* @param {Object} object The object to invert.
|
||||
* @returns {Object} Returns the new inverted object.
|
||||
* @example
|
||||
*
|
||||
* var object = { 'a': 1, 'b': 2, 'c': 1 };
|
||||
*
|
||||
* _.invert(object);
|
||||
* // => { '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));
|
||||
|
||||
module.exports = invert;
|
Loading…
Add table
Add a link
Reference in a new issue