@@ -27,26 +27,12 @@ const undefinedTag = '[object Undefined]';
27
27
const funcProto = Function . prototype ;
28
28
const funcToString = funcProto . toString ;
29
29
const objectCtorString = funcToString . call ( Object ) ;
30
- const getPrototype = overArg ( Object . getPrototypeOf , Object ) ;
30
+ const getPrototypeOf = Object . getPrototypeOf ;
31
31
const objectProto = Object . prototype ;
32
32
const hasOwnProperty = objectProto . hasOwnProperty ;
33
33
const symToStringTag = Symbol ? Symbol . toStringTag : undefined ;
34
34
const nativeObjectToString = objectProto . toString ;
35
35
36
- /**
37
- * Creates a unary function that invokes `func` with its argument transformed.
38
- *
39
- * @private
40
- * @param {Function } func The function to wrap.
41
- * @param {Function } transform The argument transform.
42
- * @returns {Function } Returns the new function.
43
- */
44
- function overArg ( func : Function , transform : any ) : any {
45
- return function ( arg : any ) {
46
- return func ( transform ( arg ) ) ;
47
- } ;
48
- }
49
-
50
36
/**
51
37
* Checks if `value` is a plain object, that is, an object created by the
52
38
* `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -79,7 +65,7 @@ export function isPlainObject(value: any) {
79
65
if ( ! isObjectLike ( value ) || baseGetTag ( value ) !== objectTag ) {
80
66
return false ;
81
67
}
82
- const proto = getPrototype ( value ) ;
68
+ const proto = getPrototypeOf ( value ) ;
83
69
if ( proto === null ) {
84
70
return true ;
85
71
}
0 commit comments