mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-20 05:14:44 +00:00
.
This commit is contained in:
parent
00c3b50fca
commit
ae5dcb46c8
7331 changed files with 1784502 additions and 0 deletions
32
node_modules/object-keys/index.js
generated
vendored
Normal file
32
node_modules/object-keys/index.js
generated
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
'use strict';
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
var isArgs = require('./isArguments');
|
||||
|
||||
var origKeys = Object.keys;
|
||||
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');
|
||||
|
||||
var originalKeys = Object.keys;
|
||||
|
||||
keysShim.shim = function shimObjectKeys() {
|
||||
if (Object.keys) {
|
||||
var keysWorksWithArguments = (function () {
|
||||
// Safari 5.0 bug
|
||||
var args = Object.keys(arguments);
|
||||
return args && args.length === arguments.length;
|
||||
}(1, 2));
|
||||
if (!keysWorksWithArguments) {
|
||||
Object.keys = function keys(object) { // eslint-disable-line func-name-matching
|
||||
if (isArgs(object)) {
|
||||
return originalKeys(slice.call(object));
|
||||
}
|
||||
return originalKeys(object);
|
||||
};
|
||||
}
|
||||
} else {
|
||||
Object.keys = keysShim;
|
||||
}
|
||||
return Object.keys || keysShim;
|
||||
};
|
||||
|
||||
module.exports = keysShim;
|
Loading…
Add table
Add a link
Reference in a new issue