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.1.2 to 2.0.0

HISTORY.md

20

LICENSE.md

@@ -1,6 +0,16 @@

(The MIT License)
Copyright © 2013+ [Bevry Pty Ltd](http://bevry.me) <us@bevry.me>
Copyright © 2011-2012 [Benjamin Lupton](http://balupton.com) <b@lupton.cc>
<!-- LICENSEFILE/ -->
# License
Unless stated otherwise all works are:
- Copyright &copy; 2013+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
- Copyright &copy; 2011+ Benjamin Lupton <b@lupton.cc> (http://balupton.com)
and licensed under:
- The incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://opensource.org/licenses/mit-license.php)
## MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@@ -11,1 +21,5 @@

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<!-- /LICENSEFILE -->

46

out/lib/requirefresh.js

@@ -1,27 +0,6 @@

// Generated by CoffeeScript 1.6.3
var app;
// Generated by CoffeeScript 1.9.1
(function() {
var requireFresh;
app = {
requireFreshSafe: function(path, next) {
var d, result;
result = null;
d = require('domain').create();
d.on('error', function(err) {
result = err;
return typeof next === "function" ? next(err) : void 0;
});
d.run(function() {
var err;
try {
result = app.requireFresh(path);
} catch (_error) {
err = _error;
result = err;
return typeof next === "function" ? next(err) : void 0;
}
return typeof next === "function" ? next(null, result) : void 0;
});
return result;
},
requireFresh: function(path) {
requireFresh = module.exports = function(path) {
var result;

@@ -33,5 +12,16 @@ path = require('path').resolve(path);

return result;
}
};
};
module.exports = app;
module.exports.safe = function(path, next) {
var err, error, result;
try {
result = requireFresh(path);
} catch (_error) {
err = _error;
error = err;
}
next(error, result);
return null;
};
}).call(this);
{
"name": "requirefresh",
"version": "1.1.2",
"description": "Require a file without adding it into the require cache",
"homepage": "https://github.com/bevry/requirefresh",
"keywords": [
"require", "requirefresh", "require-fresh", "cache"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"bugs": {
"url": "https://github.com/bevry/requirefresh/issues"
},
"repository" : {
"type": "git",
"url": "http://github.com/bevry/requirefresh.git"
},
"engines" : {
"node": ">=0.8"
},
"dependencies": {},
"devDependencies": {
"coffee-script": "~1.6.3",
"joe": "~1.3.0",
"joe-reporter-console": "~1.2.1",
"chai": "~1.7.2"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/requirefresh-test.js"
},
"main": "./out/lib/requirefresh.js"
}
"title": "Require Fresh",
"name": "requirefresh",
"version": "2.0.0",
"description": "Require a file without adding it into the require cache",
"homepage": "https://github.com/bevry/requirefresh",
"license": {
"type": "MIT"
},
"keywords": [
"require",
"requirefresh",
"require-fresh",
"cache"
],
"badges": {
"travis": true,
"npm": true,
"npmdownloads": true,
"david": true,
"daviddev": true,
"gratipay": "bevry",
"flattr": "344188/balupton-on-Flattr",
"paypal": "QB8GQPZAH84N6",
"bitcoin": "https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a",
"wishlist": "http://amzn.com/w/2F8TXKSNAFG4V"
},
"author": "2013+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me), 2011+ Benjamin Lupton <b@lupton.cc> (http://balupton.com)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
"sfrdmn (https://github.com/sfrdmn)"
],
"bugs": {
"url": "https://github.com/bevry/requirefresh/issues"
},
"repository": {
"type": "git",
"url": "http://github.com/bevry/requirefresh.git"
},
"engines": {
"node": ">=0.8"
},
"dependencies": {},
"devDependencies": {
"chai": "^2.1.1",
"coffee-script": "^1.9.1",
"joe": "^1.6.0",
"joe-reporter-console": "^1.2.1",
"projectz": "^0.5.0"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/requirefresh-test.js"
},
"main": "./out/lib/requirefresh.js",
"cakeConfiguration": {
"COFFEE_SRC_PATH": "src"
}
}

@@ -0,18 +1,41 @@

<!-- TITLE/ -->
# Require Fresh
[![Build Status](https://secure.travis-ci.org/bevry/requirefresh.png?branch=master)](http://travis-ci.org/bevry/requirefresh "Check this project's build status on TravisCI")
[![NPM version](https://badge.fury.io/js/requirefresh.png)](https://npmjs.org/package/requirefresh "View this project on NPM")
[![Gittip donate button](http://badgr.co/gittip/bevry.png)](https://www.gittip.com/bevry/ "Donate weekly to this project using Gittip")
[![Flattr donate button](https://raw.github.com/balupton/flattr-buttons/master/badge-89x18.gif)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://www.paypalobjects.com/en_AU/i/btn/btn_donate_SM.gif)](https://www.paypal.com/au/cgi-bin/webscr?cmd=_flow&SESSION=IHj3DG3oy_N9A9ZDIUnPksOi59v0i-EWDTunfmDrmU38Tuohg_xQTx0xcjq&dispatch=5885d80a13c0db1f8e263663d3faee8d14f86393d55a810282b64afed84968ec "Donate once-off to this project using Paypal")
<!-- /TITLE -->
<!-- BADGES/ -->
[![Build Status](https://img.shields.io/travis/bevry/requirefresh/master.svg)](http://travis-ci.org/bevry/requirefresh "Check this project's build status on TravisCI")
[![NPM version](https://img.shields.io/npm/v/requirefresh.svg)](https://npmjs.org/package/requirefresh "View this project on NPM")
[![NPM downloads](https://img.shields.io/npm/dm/requirefresh.svg)](https://npmjs.org/package/requirefresh "View this project on NPM")
[![Dependency Status](https://img.shields.io/david/bevry/requirefresh.svg)](https://david-dm.org/bevry/requirefresh)
[![Dev Dependency Status](https://img.shields.io/david/dev/bevry/requirefresh.svg)](https://david-dm.org/bevry/requirefresh#info=devDependencies)<br/>
[![Gratipay donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
<!-- /BADGES -->
<!-- DESCRIPTION/ -->
Require a file without adding it into the require cache
<!-- /DESCRIPTION -->
<!-- INSTALL/ -->
## Install
1. [Install Node.js](http://bevry.me/node/install)
2. `npm install --save requirefresh`
### [NPM](http://npmjs.org/)
- Use: `require('requirefresh')`
- Install: `npm install --save requirefresh`
<!-- /INSTALL -->

@@ -23,20 +46,84 @@

``` javascript
// Via call and return with no error handling
var result = require('requirefresh').requireFresh('my-module-path')
// Import
var requireFresh = require('requirefresh')
// 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){
});
// Require the module freshly synchronously (will throw errors)
try {
var result = requireFresh('my-module-path')
} catch (error) {}
// Require the fresh module synchronously (will callback with error and result)
requireFresh.safe('my-module-path', function(error,result){
if (error) {
// error
} else {
// success
}
})
```
<!-- HISTORY/ -->
## History
[You can discover the history inside the `History.md` file](https://github.com/bevry/requirefresh/blob/master/History.md#files)
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/requirefresh/blob/master/HISTORY.md#files)
<!-- /HISTORY -->
<!-- CONTRIBUTE/ -->
## Contribute
[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/bevry/requirefresh/blob/master/CONTRIBUTING.md#files)
<!-- /CONTRIBUTE -->
<!-- BACKERS/ -->
## Backers
### Maintainers
These amazing people are maintaining this project:
- Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)
### Sponsors
No sponsors yet! Will you be the first?
[![Gratipay donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")
### Contributors
These amazing people have contributed code to this project:
- [Benjamin Lupton](https://github.com/balupton) <b@lupton.cc> — [view contributions](https://github.com/bevry/requirefresh/commits?author=balupton)
- [sfrdmn](https://github.com/sfrdmn) — [view contributions](https://github.com/bevry/requirefresh/commits?author=sfrdmn)
[Become a contributor!](https://github.com/bevry/requirefresh/blob/master/CONTRIBUTING.md#files)
<!-- /BACKERS -->
<!-- LICENSE/ -->
## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
<br/>Copyright © 2013+ [Bevry Pty Ltd](http://bevry.me)
<br/>Copyright © 2011-2012 [Benjamin Arthur Lupton](http://balupton.com)
Unless stated otherwise all works are:
- Copyright &copy; 2013+ Bevry Pty Ltd <us@bevry.me> (http://bevry.me)
- Copyright &copy; 2011+ Benjamin Lupton <b@lupton.cc> (http://balupton.com)
and licensed under:
- The incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://opensource.org/licenses/mit-license.php)
<!-- /LICENSE -->

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