New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

devmode

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

devmode - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

npm-shrinkwrap.json
{
"name": "devmode",
"version": "1.0.0",
"version": "1.0.1",
"dependencies": {

@@ -5,0 +5,0 @@ "package.root": {

{
"name": "devmode",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "./lib/devmode",

@@ -30,13 +30,7 @@ # devmode

### Method "isActive"
### Node "require" Wrapper
A wrapper for the native Node.js [Module.prototype.require](https://nodejs.org/dist/latest-v4.x/docs/api/modules.html#modules_module_require_id) method.
This wrapper has been inspired by Gleb Bahmutov excellent article
[Hacking Node require](http://bahmutov.calepin.co/hacking-node-require.html) and the resulting package [really-need](https://github.com/bahmutov/really-need)
if (devmode.isActive()) {
// code will run only in dev mode, which means
// process.env.<YOUR_STAGE_ENV_VARIABLE_NAME> equals 'LAB' or 'LOCAL'
}
### Method "require"
var dependency = devmode.require('dependency');
Depending on the dev mode status, the dependency package will be loaded

@@ -47,3 +41,3 @@ from the `node_modules` (disabled) or from the `workplace directory` (enabled)

It is very useful if your package relays on modules that you also
have maintain or to extend. In devmode the modules are loaded from
have to maintain, patch or extend. In devmode the modules are loaded from
the `workplace directory` and you can edit, test and commit them directly.

@@ -65,2 +59,9 @@

### Method "isActive"
if (devmode.isActive()) {
// code will run only in dev mode, which means
// process.env.<YOUR_STAGE_ENV_VARIABLE_NAME> equals 'LAB' or 'LOCAL'
}

@@ -67,0 +68,0 @@ --------------

{
"/home/nysos/dev/devmode/lib/devmode.js":{"path":"/home/nysos/dev/devmode/lib/devmode.js","s":{"1":2,"2":2,"3":2,"4":2,"5":2,"6":2,"7":2,"8":2,"9":88,"10":88,"11":2,"12":76,"13":46,"14":46,"15":76,"16":2,"17":2,"18":2,"19":2,"20":2,"21":2,"22":66,"23":66,"24":66,"25":66,"26":59,"27":57,"28":37,"29":2,"30":44,"31":2,"32":2,"33":2,"34":13958,"35":2,"36":1},"b":{"1":[88,86],"2":[46,30],"3":[76,65],"4":[57,2],"5":[1,1]},"f":{"1":88,"2":76,"3":66,"4":13958},"fnMap":{"1":{"name":"isActive","line":45,"loc":{"start":{"line":45,"column":19},"end":{"line":45,"column":40}}},"2":{"name":"getRequirePath","line":63,"loc":{"start":{"line":63,"column":25},"end":{"line":63,"column":63}}},"3":{"name":"requireWrapper","line":100,"loc":{"start":{"line":100,"column":27},"end":{"line":100,"column":64}}},"4":{"name":"compileWrapper","line":133,"loc":{"start":{"line":133,"column":28},"end":{"line":133,"column":72}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":39}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":31}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":33}},"4":{"start":{"line":13,"column":0},"end":{"line":13,"column":54}},"5":{"start":{"line":21,"column":0},"end":{"line":21,"column":51}},"6":{"start":{"line":29,"column":0},"end":{"line":29,"column":45}},"7":{"start":{"line":36,"column":0},"end":{"line":36,"column":60}},"8":{"start":{"line":45,"column":0},"end":{"line":51,"column":2}},"9":{"start":{"line":46,"column":2},"end":{"line":47,"column":79}},"10":{"start":{"line":50,"column":2},"end":{"line":50,"column":55}},"11":{"start":{"line":63,"column":0},"end":{"line":71,"column":2}},"12":{"start":{"line":65,"column":2},"end":{"line":68,"column":3}},"13":{"start":{"line":66,"column":4},"end":{"line":66,"column":68}},"14":{"start":{"line":67,"column":4},"end":{"line":67,"column":59}},"15":{"start":{"line":70,"column":2},"end":{"line":70,"column":21}},"16":{"start":{"line":75,"column":0},"end":{"line":75,"column":53}},"17":{"start":{"line":76,"column":0},"end":{"line":76,"column":54}},"18":{"start":{"line":77,"column":0},"end":{"line":77,"column":33}},"19":{"start":{"line":79,"column":0},"end":{"line":79,"column":48}},"20":{"start":{"line":80,"column":0},"end":{"line":80,"column":49}},"21":{"start":{"line":100,"column":0},"end":{"line":124,"column":2}},"22":{"start":{"line":101,"column":2},"end":{"line":101,"column":57}},"23":{"start":{"line":102,"column":2},"end":{"line":102,"column":22}},"24":{"start":{"line":104,"column":2},"end":{"line":120,"column":3}},"25":{"start":{"line":106,"column":4},"end":{"line":106,"column":45}},"26":{"start":{"line":109,"column":4},"end":{"line":119,"column":5}},"27":{"start":{"line":112,"column":6},"end":{"line":112,"column":67}},"28":{"start":{"line":113,"column":6},"end":{"line":113,"column":51}},"29":{"start":{"line":118,"column":6},"end":{"line":118,"column":18}},"30":{"start":{"line":123,"column":2},"end":{"line":123,"column":25}},"31":{"start":{"line":128,"column":0},"end":{"line":128,"column":38}},"32":{"start":{"line":131,"column":0},"end":{"line":131,"column":50}},"33":{"start":{"line":133,"column":0},"end":{"line":135,"column":2}},"34":{"start":{"line":134,"column":2},"end":{"line":134,"column":54}},"35":{"start":{"line":140,"column":0},"end":{"line":142,"column":1}},"36":{"start":{"line":141,"column":2},"end":{"line":141,"column":51}}},"branchMap":{"1":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":18},"end":{"line":46,"column":62}},{"start":{"line":47,"column":20},"end":{"line":47,"column":78}}]},"2":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"3":{"line":65,"type":"binary-expr","locations":[{"start":{"line":65,"column":6},"end":{"line":65,"column":24}},{"start":{"line":65,"column":28},"end":{"line":65,"column":69}}]},"4":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":4},"end":{"line":109,"column":4}},{"start":{"line":109,"column":4},"end":{"line":109,"column":4}}]},"5":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":0},"end":{"line":140,"column":0}},{"start":{"line":140,"column":0},"end":{"line":140,"column":0}}]}},"l":{"3":2,"4":2,"5":2,"13":2,"21":2,"29":2,"36":2,"45":2,"46":88,"50":88,"63":2,"65":76,"66":46,"67":46,"70":76,"75":2,"76":2,"77":2,"79":2,"80":2,"100":2,"101":66,"102":66,"104":66,"106":66,"109":59,"112":57,"113":37,"118":2,"123":44,"128":2,"131":2,"133":2,"134":13958,"140":2,"141":1}}}
"/home/nysos/dev/devmode/lib/devmode.js":{"path":"/home/nysos/dev/devmode/lib/devmode.js","s":{"1":2,"2":2,"3":2,"4":2,"5":2,"6":2,"7":2,"8":2,"9":38,"10":38,"11":2,"12":26,"13":8,"14":8,"15":26,"16":2,"17":2,"18":2,"19":2,"20":2,"21":2,"22":16,"23":16,"24":16,"25":16,"26":10,"27":8,"28":4,"29":2,"30":10,"31":2,"32":2,"33":2,"34":13947,"35":2,"36":0},"b":{"1":[38,33],"2":[8,18],"3":[26,13],"4":[8,2],"5":[0,2]},"f":{"1":38,"2":26,"3":16,"4":13947},"fnMap":{"1":{"name":"isActive","line":45,"loc":{"start":{"line":45,"column":19},"end":{"line":45,"column":40}}},"2":{"name":"getRequirePath","line":63,"loc":{"start":{"line":63,"column":25},"end":{"line":63,"column":63}}},"3":{"name":"requireWrapper","line":100,"loc":{"start":{"line":100,"column":27},"end":{"line":100,"column":64}}},"4":{"name":"compileWrapper","line":133,"loc":{"start":{"line":133,"column":28},"end":{"line":133,"column":72}}}},"statementMap":{"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":39}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":31}},"3":{"start":{"line":5,"column":0},"end":{"line":5,"column":33}},"4":{"start":{"line":13,"column":0},"end":{"line":13,"column":54}},"5":{"start":{"line":21,"column":0},"end":{"line":21,"column":51}},"6":{"start":{"line":29,"column":0},"end":{"line":29,"column":45}},"7":{"start":{"line":36,"column":0},"end":{"line":36,"column":60}},"8":{"start":{"line":45,"column":0},"end":{"line":51,"column":2}},"9":{"start":{"line":46,"column":2},"end":{"line":47,"column":79}},"10":{"start":{"line":50,"column":2},"end":{"line":50,"column":55}},"11":{"start":{"line":63,"column":0},"end":{"line":71,"column":2}},"12":{"start":{"line":65,"column":2},"end":{"line":68,"column":3}},"13":{"start":{"line":66,"column":4},"end":{"line":66,"column":68}},"14":{"start":{"line":67,"column":4},"end":{"line":67,"column":59}},"15":{"start":{"line":70,"column":2},"end":{"line":70,"column":21}},"16":{"start":{"line":75,"column":0},"end":{"line":75,"column":53}},"17":{"start":{"line":76,"column":0},"end":{"line":76,"column":54}},"18":{"start":{"line":77,"column":0},"end":{"line":77,"column":33}},"19":{"start":{"line":79,"column":0},"end":{"line":79,"column":48}},"20":{"start":{"line":80,"column":0},"end":{"line":80,"column":49}},"21":{"start":{"line":100,"column":0},"end":{"line":124,"column":2}},"22":{"start":{"line":101,"column":2},"end":{"line":101,"column":57}},"23":{"start":{"line":102,"column":2},"end":{"line":102,"column":22}},"24":{"start":{"line":104,"column":2},"end":{"line":120,"column":3}},"25":{"start":{"line":106,"column":4},"end":{"line":106,"column":45}},"26":{"start":{"line":109,"column":4},"end":{"line":119,"column":5}},"27":{"start":{"line":112,"column":6},"end":{"line":112,"column":67}},"28":{"start":{"line":113,"column":6},"end":{"line":113,"column":51}},"29":{"start":{"line":118,"column":6},"end":{"line":118,"column":18}},"30":{"start":{"line":123,"column":2},"end":{"line":123,"column":25}},"31":{"start":{"line":128,"column":0},"end":{"line":128,"column":38}},"32":{"start":{"line":131,"column":0},"end":{"line":131,"column":50}},"33":{"start":{"line":133,"column":0},"end":{"line":135,"column":2}},"34":{"start":{"line":134,"column":2},"end":{"line":134,"column":54}},"35":{"start":{"line":140,"column":0},"end":{"line":142,"column":1}},"36":{"start":{"line":141,"column":2},"end":{"line":141,"column":51}}},"branchMap":{"1":{"line":46,"type":"binary-expr","locations":[{"start":{"line":46,"column":18},"end":{"line":46,"column":62}},{"start":{"line":47,"column":20},"end":{"line":47,"column":78}}]},"2":{"line":65,"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":65,"column":2}},{"start":{"line":65,"column":2},"end":{"line":65,"column":2}}]},"3":{"line":65,"type":"binary-expr","locations":[{"start":{"line":65,"column":6},"end":{"line":65,"column":24}},{"start":{"line":65,"column":28},"end":{"line":65,"column":69}}]},"4":{"line":109,"type":"if","locations":[{"start":{"line":109,"column":4},"end":{"line":109,"column":4}},{"start":{"line":109,"column":4},"end":{"line":109,"column":4}}]},"5":{"line":140,"type":"if","locations":[{"start":{"line":140,"column":0},"end":{"line":140,"column":0}},{"start":{"line":140,"column":0},"end":{"line":140,"column":0}}]}},"l":{"3":2,"4":2,"5":2,"13":2,"21":2,"29":2,"36":2,"45":2,"46":38,"50":38,"63":2,"65":26,"66":8,"67":8,"70":26,"75":2,"76":2,"77":2,"79":2,"80":2,"100":2,"101":16,"102":16,"104":16,"106":16,"109":10,"112":8,"113":4,"118":2,"123":10,"128":2,"131":2,"133":2,"134":13947,"140":2,"141":0}}}

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