mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Remove getPrototype.
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
import overArg from './.internal/overArg.js';
|
||||
|
||||
/** Built-in value references. */
|
||||
const getPrototype = overArg(Object.getPrototypeOf, Object);
|
||||
|
||||
export default getPrototype;
|
||||
@@ -1,5 +1,4 @@
|
||||
import arrayPush from './.internal/arrayPush.js';
|
||||
import getPrototype from './.internal/getPrototype.js';
|
||||
import getSymbols from './.internal/getSymbols.js';
|
||||
import stubArray from './stubArray.js';
|
||||
|
||||
@@ -17,7 +16,7 @@ const getSymbolsIn = !nativeGetSymbols ? stubArray : object => {
|
||||
const result = [];
|
||||
while (object) {
|
||||
arrayPush(result, getSymbols(object));
|
||||
object = getPrototype(object);
|
||||
object = Object.getPrototypeOf(Object(object));
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import baseCreate from './.internal/baseCreate.js';
|
||||
import getPrototype from './.internal/getPrototype.js';
|
||||
import isPrototype from './.internal/isPrototype.js';
|
||||
|
||||
/**
|
||||
@@ -11,7 +10,7 @@ import isPrototype from './.internal/isPrototype.js';
|
||||
*/
|
||||
function initCloneObject(object) {
|
||||
return (typeof object.constructor == 'function' && !isPrototype(object))
|
||||
? baseCreate(getPrototype(object))
|
||||
? baseCreate(Object.getPrototypeOf(object))
|
||||
: {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user