Socket
Socket
Sign inDemoInstall

@hapi/hoek

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hapi/hoek - npm Package Compare versions

Comparing version 9.0.1 to 9.0.2

15

lib/clone.js

@@ -138,6 +138,2 @@ 'use strict';

if (baseProto === Types.array) {
return [];
}
if (options.prototype === false) { // Defaults to true

@@ -148,3 +144,3 @@ if (internals.needsProtoHack.has(baseProto)) {

return {};
return baseProto === Types.array ? [] : {};
}

@@ -159,2 +155,11 @@

if (baseProto === Types.array) {
const newObj = [];
if (proto !== baseProto) {
Object.setPrototypeOf(newObj, proto);
}
return newObj;
}
if (internals.needsProtoHack.has(baseProto)) {

@@ -161,0 +166,0 @@ const newObj = new proto.constructor();

{
"name": "@hapi/hoek",
"description": "General purpose node utilities",
"version": "9.0.1",
"version": "9.0.2",
"repository": "git://github.com/hapijs/hoek",

@@ -6,0 +6,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc