Skip to content

Commit 1c6c39b

Browse files
authored
refactor(core): fix eslint warning (#5382)
1 parent a686b88 commit 1c6c39b

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

packages/opentelemetry-core/src/utils/lodash.merge.ts

+2-16
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,12 @@ const undefinedTag = '[object Undefined]';
2727
const funcProto = Function.prototype;
2828
const funcToString = funcProto.toString;
2929
const objectCtorString = funcToString.call(Object);
30-
const getPrototype = overArg(Object.getPrototypeOf, Object);
30+
const getPrototypeOf = Object.getPrototypeOf;
3131
const objectProto = Object.prototype;
3232
const hasOwnProperty = objectProto.hasOwnProperty;
3333
const symToStringTag = Symbol ? Symbol.toStringTag : undefined;
3434
const nativeObjectToString = objectProto.toString;
3535

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-
5036
/**
5137
* Checks if `value` is a plain object, that is, an object created by the
5238
* `Object` constructor or one with a `[[Prototype]]` of `null`.
@@ -79,7 +65,7 @@ export function isPlainObject(value: any) {
7965
if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {
8066
return false;
8167
}
82-
const proto = getPrototype(value);
68+
const proto = getPrototypeOf(value);
8369
if (proto === null) {
8470
return true;
8571
}

0 commit comments

Comments
 (0)