cione-comp-lib
Version:
`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`
19 lines (18 loc) • 562 B
JavaScript
import isObject from "./isObject.mjs";
import isPrototype from "./_isPrototype.mjs";
import nativeKeysIn from "./_nativeKeysIn.mjs";
var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object), result = [];
for (var key in object) {
if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
export { baseKeysIn as default };