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

quibble

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quibble - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

example/yarn.lock

29

lib/quibble.js

@@ -1,4 +0,4 @@

// Generated by CoffeeScript 1.11.1
// Generated by CoffeeScript 1.12.4
(function() {
var Module, _, config, doWithoutCache, fakeLoad, hackErrorStackToGetCallerFile, ignoredCallerFiles, originalLoad, path, quibble, quibbles, requireWasCalledFromAFileThatHasQuibbledStuff;
var Module, _, config, doAndDeleteCache, doAndRestoreCache, doWithoutCache, fakeLoad, hackErrorStackToGetCallerFile, ignoredCallerFiles, originalLoad, path, quibble, quibbles, requireWasCalledFromAFileThatHasQuibbledStuff;

@@ -16,2 +16,3 @@ _ = {

uniq: require('lodash/uniq'),
tap: require('lodash/tap'),
values: require('lodash/values')

@@ -106,14 +107,26 @@ };

doWithoutCache = function(request, parent, thingToDo) {
var cachedThing, filename, result;
var filename;
filename = Module._resolveFilename(request, parent);
if (!Module._cache.hasOwnProperty(filename)) {
return thingToDo();
if (Module._cache.hasOwnProperty(filename)) {
return doAndRestoreCache(filename, thingToDo);
} else {
return doAndDeleteCache(filename, thingToDo);
}
};
doAndRestoreCache = function(filename, thingToDo) {
var cachedThing;
cachedThing = Module._cache[filename];
delete Module._cache[filename];
result = thingToDo();
Module._cache[filename] = cachedThing;
return result;
return _.tap(thingToDo(), function() {
return Module._cache[filename] = cachedThing;
});
};
doAndDeleteCache = function(filename, thingToDo) {
return _.tap(thingToDo(), function() {
return delete Module._cache[filename];
});
};
hackErrorStackToGetCallerFile = function(includeGlobalIgnores) {

@@ -120,0 +133,0 @@ var currentFile, e, originalFunc;

{
"name": "quibble",
"version": "0.4.0",
"version": "0.4.1",
"description": "Makes it easy to replace require'd dependencies.",

@@ -17,3 +17,3 @@ "homepage": "https://github.com/testdouble/quibble",

"test:example": "cd example && npm test",
"test:dependents": "npm run compile && dont-break --timeout 90",
"test:dependents": "npm run compile && dont-break --timeout 400",
"test:ci": "npm test && npm run test:example && npm run test:dependents",

@@ -38,2 +38,3 @@ "preversion": "git pull --rebase && npm run test:ci",

"mocha-given": "^0.1.3",
"pryjs": "^1.0.3",
"testem": "^0.9.7"

@@ -40,0 +41,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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