Welcome to the AI slop.
This commit is contained in:
commit
adc01bb99c
1925 changed files with 238364 additions and 0 deletions
27
node_modules/get-proto/index.js
generated
vendored
Normal file
27
node_modules/get-proto/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict';
|
||||
|
||||
var reflectGetProto = require('./Reflect.getPrototypeOf');
|
||||
var originalGetProto = require('./Object.getPrototypeOf');
|
||||
|
||||
var getDunderProto = require('dunder-proto/get');
|
||||
|
||||
/** @type {import('.')} */
|
||||
module.exports = reflectGetProto
|
||||
? function getProto(O) {
|
||||
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
||||
return reflectGetProto(O);
|
||||
}
|
||||
: originalGetProto
|
||||
? function getProto(O) {
|
||||
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
||||
throw new TypeError('getProto: not an object');
|
||||
}
|
||||
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
||||
return originalGetProto(O);
|
||||
}
|
||||
: getDunderProto
|
||||
? function getProto(O) {
|
||||
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
||||
return getDunderProto(O);
|
||||
}
|
||||
: null;
|
||||
Loading…
Add table
Add a link
Reference in a new issue