UNPKG

@pnpm/types

Version:
23 lines • 747 B
// NOTE: The order in this array is important. export const DEPENDENCIES_FIELDS = [ 'optionalDependencies', 'dependencies', 'devDependencies', ]; export const DEPENDENCIES_OR_PEER_FIELDS = [ ...DEPENDENCIES_FIELDS, 'peerDependencies', ]; export const DEFAULT_REGISTRY_SCOPE = '@'; /** * True for objects created by `{}` or `Object.create(null)`, including across * VM realms where `Object.prototype` differs from the caller's realm. */ export function isPlainObject(value) { if (Object.prototype.toString.call(value) !== '[object Object]') { return false; } const proto = Object.getPrototypeOf(value); return proto === null || Object.getPrototypeOf(proto) === null; } //# sourceMappingURL=misc.js.map