Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proxyquire

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxyquire - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

test/proxyquire-non-object.js

10

lib/proxyquire.js

@@ -12,6 +12,8 @@ 'use strict';

function fillMissingKeys(mdl, original) {
Object.keys(original).forEach(function (key) {
if (!mdl[key]) mdl[key] = original[key];
});
if (is.Object(original) || is.Function(original)) {
// fill in keys for all objects
Object.keys(original).forEach(function (key) {
if (!mdl[key]) mdl[key] = original[key];
});
}
return mdl;

@@ -18,0 +20,0 @@ }

2

package.json
{
"name": "proxyquire",
"version": "1.1.0",
"version": "1.2.0",
"description": "Proxies nodejs require in order to allow overriding dependencies during testing.",

@@ -5,0 +5,0 @@ "main": "index.js",

var stats = require('./stats')
, bar = require('./bar')
, boof = require('./boof')
, foonum = require('./foonum')
, foobool = require('./foobool')
, path = require('path')

@@ -31,3 +34,6 @@ ;

, bigBas: bigBas
, boof: boof
, foonum: foonum
, foobool: foobool
, state: ''
};
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