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

requirefresh

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

requirefresh - npm Package Compare versions

Comparing version 1.0.1 to 1.1.1

19

out/lib/requirefresh.js

@@ -5,3 +5,3 @@ // Generated by CoffeeScript 1.6.3

app = {
requireFresh: function(path, next) {
requireFreshSafe: function(path, next) {
var d, result;

@@ -17,6 +17,3 @@ result = null;

try {
path = require('path').resolve(path);
delete require.cache[path];
result = require(path);
return delete require.cache[path];
return result = app.requireFresh(path);
} catch (_error) {

@@ -27,8 +24,14 @@ err = _error;

} finally {
if (typeof next === "function") {
next(null, result);
}
return typeof next === "function" ? next(null, result) : void 0;
}
});
return result;
},
requireFresh: function(path) {
var result;
path = require('path').resolve(path);
delete require.cache[path];
result = require(path);
delete require.cache[path];
return result;
}

@@ -35,0 +38,0 @@ };

{
"name": "requirefresh",
"version": "1.0.1",
"version": "1.1.1",
"description": "Require a file without adding it into the require cache",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/bevry/requirefresh",

@@ -23,3 +23,9 @@ # Require Fresh

``` javascript
var theLoadedModule = require('requirefresh').requireFresh('my-module-path')
// Via call and return with no error handling
var result = require('requirefresh').requireFresh('my-module-path')
// Via callback uses domains for errors (with try/catch for node 0.8 support)
var resultOrError = require('requireFresh').requireFreshSafe('my-module-path', function(err,result){
});
```

@@ -26,0 +32,0 @@

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