{"_id":"detect-node","_rev":"19-e6701a01ecba84e9bb36b8df448ec1c3","name":"detect-node","description":"Detect Node.JS (as opposite to browser environment) (reliable)","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"detect-node","version":"1.0.0","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/iliakan/detect-node"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","_id":"detect-node@1.0.0","_shasum":"0dce710909dcb78d46a44889f8b78c983d27f1df","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"dist":{"shasum":"0dce710909dcb78d46a44889f8b78c983d27f1df","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-1.0.0.tgz","integrity":"sha512-gcjE0mv88PI1EKvIg4InC5RqVmshYyqUVOT9WyGi2V+4GCMMp3+72qiZfCtOXy/tlHTZFrwrUvp0TvACaqlIKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDklCnfux71dGo3Af51qGpHBdP+hsYf+0hOnbqP6vJGIwIgeZynk/5pXO/YSV4KMpna8dHBGEk39QtpeQVOtoqt9i0="}]},"directories":{}},"2.0.0":{"name":"detect-node","version":"2.0.0","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/iliakan/detect-node"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","gitHead":"3e1d2591bdbf5e3ac1d36f4b81ddb91f37fc2280","_id":"detect-node@2.0.0","_shasum":"5ed01329818006b14a19ac8f68ec1e1a65cce725","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"dist":{"shasum":"5ed01329818006b14a19ac8f68ec1e1a65cce725","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.0.tgz","integrity":"sha512-U+oUAYJyg+e9wXu+fuBHOhA3GJMReL8dTiS1fszrIMtT4eBUSg2T7MuIcpyMqDNS8qHTVFxZC7so9DHUuw5+tQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH0kjjpqfuOudTZkcxHAVCzl+SfrAT0/BVnozaag3CBgCIQDIVqrYSMEu9cq1IutTtCcI6WYBqeVRJ/KG7ZMyfKcJ6A=="}]},"directories":{}},"2.0.1":{"name":"detect-node","version":"2.0.1","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/iliakan/detect-node"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","_id":"detect-node@2.0.1","_shasum":"d10f1b84000e46670f9f3d1456d92d07a3ac3bdf","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"dist":{"shasum":"d10f1b84000e46670f9f3d1456d92d07a3ac3bdf","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.1.tgz","integrity":"sha512-zdj5ca8T5gmKNz6AZGP4iSbsMOk5LGYTdeKGmAPO5iYT2wEuVki8u3BA48gkwGvJrVjP8Rk/zkiBZEI8MIXkpA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYcVgAlTS7jGMI6LuWka8NwcktZwxCljp6UQMP9KfLAgIgdcbjKgr3CR+PpznFvU70ARbOCC3MD0+8sWPoY90RsOg="}]},"directories":{}},"2.0.2":{"name":"detect-node","version":"2.0.2","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/iliakan/detect-node"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","_id":"detect-node@2.0.2","_shasum":"1d35ceac9f2b4becc5e8eae0f46a70c730e921f5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"dist":{"shasum":"1d35ceac9f2b4becc5e8eae0f46a70c730e921f5","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.2.tgz","integrity":"sha512-UoejuCqm/KueA9M+LVU5kUmCAex5Jqo72MJi1Qtnn3TQydzwSVyopYuc0BcrG0MSQ8X8/DUEKlRFpzbXp4EzEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBMMaYYjJ2/wEL1lv9AryZB59NXDkqxLPrGtbSsNJoIXAiEAs56ZDcSXJth0MFucTfBjWK8QmxHLIgOSfSvRd+foVDc="}]},"directories":{}},"2.0.3":{"name":"detect-node","version":"2.0.3","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"https://github.com/iliakan/detect-node"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","gitHead":"4837fa0620d2e8db948a718a8b5f89a8073c8ff4","_id":"detect-node@2.0.3","_shasum":"a2033c09cc8e158d37748fbde7507832bd6ce127","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"dist":{"shasum":"a2033c09cc8e158d37748fbde7507832bd6ce127","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz","integrity":"sha512-64uDTOK+fKEa6XoSbkkDoeAX8Ep1XhwxwZtL1aw1En5p5UOK/ekJoFqd5BB1o+uOvF1iHVv6qDUxdOQ/VgWEQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU2e/hFSoUF+wPjtxqF0BqGYqgS2xflSyWZ602GPy/egIhAOS6nvgOb5rjrLcoaSkEcTrVIzCBTbhbr6YkOsFQe5MJ"}]},"directories":{}},"2.0.4":{"name":"detect-node","version":"2.0.4","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","browser":"browser.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/iliakan/detect-node.git"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"ISC","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","gitHead":"563e0b838ec1dd9b169d843268cdb220b78ddd91","_id":"detect-node@2.0.4","_npmVersion":"6.4.0","_nodeVersion":"10.9.0","_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"dist":{"integrity":"sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==","shasum":"014ee8f8f669c5c58023da64b8179c083a28c46c","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz","fileCount":5,"unpackedSize":2549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbiWQ3CRA9TVsSAnZWagAAMrwQAJUWqhr3R8fUX9E2H04D\nNcoFtX6tYlFDUWz7AegYBpyj8E2c85Osf16LOM/WCAYhusmIw0kkEfd1suU2\nw7tXK+hQeDvQvhh5WGXqT88fI6UY33ryXHK4/J6QX5k1AXMO4jm74EQ8hXCs\nINjy6O+DC2CEni+CgUgxxU1CmIABcRGaB7WIwFOuwlgaHo7QRUnVnpqeZ6ZN\n7RpVE+3ucJjvCW1s5d/6pLYiRoRZIfudBMRD9OYkdvFGzQ71BKo7AhPQa4Bz\n5w8g3i0UQ6sx7RSYrWNeXRlrAD798fwvGtXsUwIkUE9QJzfT+k5jdHS/aFJT\n3cIIq4+jwV9ODJkkGxmILaWRpuBLpHI+syh3/Xmb113bB1QpcLij1BXJS8sN\ncR1xnLlD72CuFYuAeDkxsTk47D+mK0IDVWa9HgDi8D7IqBSwNOZLW1tuddql\nThwQWn6KIzzCzMKlBajt0rqyIUt5J4kLVXVS7wKvJRQhyaCrguFrdE4jbsjy\npCoqBydwvtrBnLlydr0WbNE94xoLPudJPlxjnyWrAd/MmjvI3RfhAAM+oQkE\n6s00+x2fx2cT51wjX/w+STN5CvNLGZerpTM0xgZmztwB2aWUVBybvAxdtW4F\nhaIf21JXHvTl5F8UXqKHD4dv6mB1w9X1ZcDYZ/hxetoj70xhevfvmFGZ3mVs\n6W0B\r\n=HQIg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgo+/C29sGyRr3grWPcPuEXwat0GK2dQALAKFiK5M0BQIgJ+7EKfCB7aV1JZYUdkSjl6r0sQZq5kRNPEDwOvmeZhU="}]},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-node_2.0.4_1535730743130_0.9044559921683464"},"_hasShrinkwrap":false},"2.0.5":{"name":"detect-node","version":"2.0.5","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","browser":"browser.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/iliakan/detect-node.git"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"MIT","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","gitHead":"5055d28c8eb98fcc7fdb762dc280a88d05784c28","_id":"detect-node@2.0.5","_nodeVersion":"15.7.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==","shasum":"9d270aa7eaa5af0b72c4c9d9b814e7f4ce738b79","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz","fileCount":5,"unpackedSize":2549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUP69CRA9TVsSAnZWagAAdUIQAJwQhBvVYMfWaxprMSjN\nJ5h3YZ7JEApM0tfMVJehWb97v5E4jo3oJh+BSqkgJdUdcOPv2rF9UDajHUDJ\nOF42yo/A4aydvzxBvUMCBmW4KTRHkLaFDItAPgHcfVLbipVgV74SR7YFO6sG\nUD2ysu6tJkCysprDwsg73vwazWZxJK+loGdmSPHbvzREtt+PcM0W/zuC+qkR\n5rgTHDgrAsWRJSZnEAhVk25IF+2kkmQMaNZgtSSSpKZZ6GCOThpMjdY/Has7\nQYizb0G73+tCPpbBwrQVTC7AwrK8R643/YW9TDo9Wyg5NfMCbs2xrVnJn5cy\noCn6JvjIY1qnZJWiKoJ7QilmiC2d8WVvMZYgit/D1L8xf0jwmxjSSnq+nDip\nSw7ZGMoPPy8yY3MOAUaSsWPLMpc+sV7n5zPiOjoOxUZ86G7oTQCOjiMt/DTz\nnh3p4ejDHSOkNbbaPZZNnXDZsqNYwGJQQmOsy4yhVWTNmnEsH6/OsBBoHMZd\nF2Ul06RkpGvj2t3TtTNLx0+ctevyQ4VDV2xK0hoRXKV9tqNDSdQXSgOywldw\na8clbxvlbiIjP5bTvnkpVJ0kUQ3muv9gfRlF/97ZLlZCcgVpGR13GCKuYUrp\ncLfvERunm7juj8R/bq7blRZ0DUBzqu2nsj7EFgy43nORi70FrdrSdOMYz/V4\nCNzF\r\n=kSiV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHD2dnEQT7Bpzz1aJxJ/UQ2sP017MmIxqob3VKKWTYAaAiEAjyZLuwk2f+rMz56w6Ki6sKpqYeUU+VAQnvOS1M2UU8o="}]},"_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"directories":{},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-node_2.0.5_1615920829418_0.8787741762510632"},"_hasShrinkwrap":false},"2.1.0":{"name":"detect-node","version":"2.1.0","description":"Detect Node.JS (as opposite to browser environment) (reliable)","main":"index.js","module":"index.esm.js","browser":"browser.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/iliakan/detect-node.git"},"keywords":["detect","node"],"author":{"name":"Ilya Kantor"},"license":"MIT","bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"homepage":"https://github.com/iliakan/detect-node","gitHead":"00381fd0fdbdefa625ac7b8230adfc1df11d49ad","_id":"detect-node@2.1.0","_nodeVersion":"16.1.0","_npmVersion":"7.12.0","dist":{"integrity":"sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==","shasum":"c9c70775a49c3d03bc2c06d9a73be550f978f8b1","tarball":"https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz","fileCount":6,"unpackedSize":2761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoL0ECRA9TVsSAnZWagAACxoP/3XEIC6oXJUgOl0z/2cG\nY+eSDljcMKqTvKArVrDBbxWr1xXU9I+g1pNrqbibDXRxiwURHWn+gLRDJwws\nTP3tL/jS/ebDIKvxAGZdtiiXVdYA2N8Qbrg60KttffC8CowdefppAx46QDgF\nrzfw5cgmJIIqN0OnwBq2mUuihF/OOAbCXoXbsrPHpefmc9wAt4Z5atgZ1WX+\nhAPAge6E+SAk+AOlkvH/UVjXO07MKDGckqkWGIvZJm6JD573GAnX25gpMM9/\nC5ObH9jorTV2IQw49IdHDsYp6Zwa3fQm1tqw0e+FLldIFwvPLRwDrnif2TAd\nnCXs1jR83XFzsl6Pi5rFNNcuhm9GATSmG7CtmgYpF0pNHXyh+eyXtDqmdVUe\nPwvgoiyAnTUUu2DclGocDNqT3MvAyBzdZX16/sJppqKlBn+whZDey6VrO0f+\nyrDksFhFBQF5/7lX2jAXFcCf4Qm2I0/6kqiCPH5utpoYTqa37FiYGpVflpmY\nGXCE2JnA9lMG9funVl0G0u2LsdxRJLMLLOW13BhN4xjgYfVuOX5gWU4KVRYr\noF3ZNO2gvDLBxP1FHX5i7JOoQpKumiWdjUozjbAgfplmRJwaYh+euqboR03+\nfTEiifDFjUdYu4wBPWlPCgdWrzwf/lOtBZDsD3BzXtNb2q7y6PgJ0dGugXa9\ngOPI\r\n=m3pu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB7voJ6WKkXZjWL008NvvveaL6dAMF/yt9eApLm95KGwAiEA0wHaMgy946irmImfZs7/ArIY+0+7mGQZmfQ1+40NXCo="}]},"_npmUser":{"name":"iliakan","email":"iliakan@gmail.com"},"directories":{},"maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/detect-node_2.1.0_1621146884014_0.30255741347595166"},"_hasShrinkwrap":false}},"readme":"### Install\n\n```shell\nnpm install --save detect-node\n```\n\n### Usage:\n\n```js\nvar isNode = require('detect-node');\n\nif (isNode) {\n  console.log(\"Running under Node.JS\");\n} else {\n  alert(\"Hello from browser (or whatever not-a-node env)\");\n}\n```\n\nThe check is performed as:\n```js\nmodule.exports = false;\n\n// Only Node.JS has a process variable that is of [[Class]] process\ntry {\n module.exports = Object.prototype.toString.call(global.process) === '[object process]' \n} catch(e) {}\n\n```\n\nThanks to Ingvar Stepanyan for the initial idea. This check is both **the most reliable I could find** and it does not use `process` env directly, which would cause browserify to include it into the build.\n","maintainers":[{"name":"iliakan","email":"iliakan@gmail.com"}],"time":{"modified":"2022-06-15T01:57:54.983Z","created":"2014-07-31T10:20:21.252Z","1.0.0":"2014-07-31T10:20:21.252Z","2.0.0":"2014-07-31T10:30:55.255Z","2.0.1":"2014-07-31T10:34:58.862Z","2.0.2":"2014-07-31T10:36:39.833Z","2.0.3":"2014-08-01T16:28:40.851Z","2.0.4":"2018-08-31T15:52:23.291Z","2.0.5":"2021-03-16T18:53:49.576Z","2.1.0":"2021-05-16T06:34:44.130Z"},"homepage":"https://github.com/iliakan/detect-node","keywords":["detect","node"],"repository":{"type":"git","url":"git+https://github.com/iliakan/detect-node.git"},"author":{"name":"Ilya Kantor"},"bugs":{"url":"https://github.com/iliakan/detect-node/issues"},"license":"MIT","readmeFilename":"Readme.md","users":{"xch":true,"i-erokhin":true,"cliff":true}}