{"bugs":{"url":"https://github.com/gagle/node-is-global/issues"},"dist":{"shasum":"74305fd0f8661b3fdfe802d11aa970668dcdcd33","tarball":"https://registry.npmjs.org/is-global/-/is-global-0.1.0.tgz","integrity":"sha512-5OVSkef56AjBjV92eUwpZ8cvbPqWqqu5oIY+Aqc80hdI575lDt4fOuDN56g8/DERUT8W+8WTjRpRzVnHDWGW5w==","signatures":[{"sig":"MEUCIA9fEKH1s0kmPrw/rh8Y7S3iYiZvCaEO+mYzIGHTl+EhAiEAvLQSSqIj1ZhDG6XS/rBe39yGkS38+OeMmD92RyoRWfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib","name":"is-global","_from":".","author":{"name":"Gabriel Llamas","email":"gagle@outlook.com"},"readme":"is-global\r\n=========\r\n\r\n#### Checks whether Node.js is running a global module ####\r\n\r\n[![NPM version](https://badge.fury.io/js/is-global.png)](http://badge.fury.io/js/is-global \"Fury Version Badge\")\r\n\r\n[![NPM installation](https://nodei.co/npm/is-global.png?mini=true)](https://nodei.co/npm/is-global \"NodeICO Badge\")\r\n\r\nThere are times that you need to know whether Node.js is executing a global module, typically when you're writing a third-party module and want to execute different pieces of code depending on the current context; local or global module.\r\n\r\nOn Windows the `PATH` environment variable is read to check the context. Node.js scripts running inside the npm install directory will always return true, eg:\r\n\r\n```\r\ncd C:\\Users\\<user>\\AppData\\Roaming\\npm\r\nnode app.js\r\n```\r\n\r\nTherefore, don't run scripts from inside the npm install directory. No one does that so you can assume that on Windows platform it detects the global module execution correctly.\r\n\r\n#### Functions ####\r\n\r\n- [_module_() : Boolean](#isGlobal)\r\n\r\n---\r\n\r\n<a name=\"isGlobal\"></a>\r\n___module_() : Boolean__\r\n\r\nReturns true if Node.js is executing a global module, otherwise false.\r\n\r\n```javascript\r\nvar isGlobal = require (\"is-global\");\r\nif (isGlobal ()){\r\n  ...\r\n}else{\r\n  ...\r\n}\r\n```","engines":{"node":">=0.10"},"license":"MIT","_npmUser":{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"},"homepage":"https://github.com/gagle/node-is-global","keywords":["global","module"],"repository":{"url":"git://github.com/gagle/node-is-global.git","type":"git"},"_npmVersion":"1.3.14","description":"Checks whether Node.js is running a global module","maintainers":[{"name":"gagle","email":"gabriel_llamas_llopis@yahoo.es"}],"readmeFilename":"README.md","_id":"is-global@0.1.0","version":"0.1.0"}