{"_id":"is-in-browser","_rev":"330060","name":"is-in-browser","description":"Simple check to see if current app is running in browser","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"time":{"modified":"2021-06-07T02:45:46.000Z","created":"2016-03-15T03:17:05.630Z","2.0.0":"2021-02-07T15:32:20.140Z","1.1.3":"2017-01-15T05:26:43.126Z","1.1.2":"2017-01-07T03:27:00.842Z","1.1.1":"2017-01-07T03:21:21.415Z","1.1.0":"2017-01-06T22:40:57.005Z","1.0.2":"2016-10-22T15:23:48.400Z","1.0.1":"2016-03-15T03:19:38.418Z","1.0.0":"2016-03-15T03:17:05.630Z"},"users":{"zuojiang":true},"author":{"name":"Jared Anderson"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"versions":{"2.0.0":{"name":"is-in-browser","version":"2.0.0","description":"Simple check to see if current app is running in browser","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs"},"./package.json":"./package.json"},"scripts":{"dist.cjs":"BABEL_ENV=cjs babel -x \".ts\" src/index.ts -o dist/index.cjs","dist.es":"BABEL_ENV=es babel -x \".ts\" src/index.ts -o dist/index.mjs","dist.declarations":"tsc --emitDeclarationOnly src/index.ts --declaration --outDir dist","dist":"concurrently \"npm:dist.*\"","test.jest":"BABEL_ENV=cjs jest","test.node":"BABEL_ENV=cjs babel-node -x \".ts\" src/node.check.ts","test":"concurrently \"npm:test.*\"","lint":"eslint src --ext .ts","format":"prettier -w src","prepublishOnly":"concurrently npm:test npm:dist"},"keywords":[],"browserslist":["defaults"],"license":"MIT","devDependencies":{"@babel/cli":"^7.12.13","@babel/core":"^7.12.13","@babel/node":"^7.12.13","@babel/plugin-transform-modules-commonjs":"^7.12.13","@babel/preset-typescript":"^7.12.13","@types/jest":"^26.0.20","@typescript-eslint/eslint-plugin":"^4.14.2","@typescript-eslint/parser":"^4.14.2","babel-eslint":"^4.1.6","concurrently":"^5.3.0","eslint":"^7.19.0","eslint-plugin-prettier":"^3.3.1","jest":"^26.6.3","prettier":"^2.2.1","typescript":"^4.1.3"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"abc521492c99359d49d02a5b3e966b03abb91133","_id":"is-in-browser@2.0.0","_nodeVersion":"14.15.4","_npmVersion":"7.5.2","dist":{"shasum":"a2343a18d8f8a600e8a20cb3022183a251e30355","size":2916,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-2.0.0.tgz"},"_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-in-browser_2.0.0_1612711940009_0.0793345164973338"},"_hasShrinkwrap":false,"publish_time":1612711940140,"_cnpm_publish_time":1612711940140},"1.1.3":{"name":"is-in-browser","version":"1.1.3","description":"Simple check to see if current app is running in browser","main":"dist/index.js","module":"dist/module.js","types":"dist/index.d.ts","scripts":{"build":"BABEL_ENV=cjs babel src -d dist && BABEL_ENV=module babel src/index.js -o dist/module.js && cpy src/index.d.ts dist","test":"babel-tape-runner test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-tape-runner":"^2.0.1","cpy-cli":"^1.0.1","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"653d0586c8d40db93262536ec60a4d2d50f3d78d","_id":"is-in-browser@1.1.3","_shasum":"56ff4db683a078c6082eb95dad7dc62e1d04f835","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"56ff4db683a078c6082eb95dad7dc62e1d04f835","size":1594,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.1.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.1.3.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-in-browser-1.1.3.tgz_1484458002909_0.8532413989305496"},"publish_time":1484458003126,"_cnpm_publish_time":1484458003126,"_hasShrinkwrap":false},"1.1.2":{"name":"is-in-browser","version":"1.1.2","description":"Simple check to see if current app is running in browser","main":"dist/index.js","types":"dist/index.d.ts","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist && cpy src/index.d.ts dist","test":"babel-tape-runner test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-tape-runner":"^2.0.1","cpy-cli":"^1.0.1","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"113a4414c2de57969999f53bc7ddba9b0692fae1","_id":"is-in-browser@1.1.2","_shasum":"9e3e5e02159dd43eda45b681210bbc920f680a72","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"9e3e5e02159dd43eda45b681210bbc920f680a72","size":1482,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.1.2.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-in-browser-1.1.2.tgz_1483759618896_0.17822384531609714"},"publish_time":1483759620842,"_cnpm_publish_time":1483759620842,"_hasShrinkwrap":false},"1.1.1":{"name":"is-in-browser","version":"1.1.1","description":"Simple check to see if current app is running in browser","main":"dist/index.js","types":"dist/index.d.ts","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist && cpy src/index.d.ts dist","test":"babel-tape-runner test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-tape-runner":"^2.0.1","cpy-cli":"^1.0.1","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"113a4414c2de57969999f53bc7ddba9b0692fae1","_id":"is-in-browser@1.1.1","_shasum":"93e8c121fcdda005404cd673f8697eae7384ce39","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"93e8c121fcdda005404cd673f8697eae7384ce39","size":1218,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.1.1.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/is-in-browser-1.1.1.tgz_1483759280744_0.1906801676377654"},"publish_time":1483759281415,"_cnpm_publish_time":1483759281415,"_hasShrinkwrap":false},"1.1.0":{"name":"is-in-browser","version":"1.1.0","description":"Simple check to see if current app is running in browser","main":"dist/index.js","types":"dist/index.d.ts","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist && cpy src/index.d.ts dist","test":"babel-tape-runner test/*.js | tap-spec"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-tape-runner":"^2.0.1","cpy-cli":"^1.0.1","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"b7c87197bd461b0bbc7173146036f770bb5b2ead","_id":"is-in-browser@1.1.0","_shasum":"f3e03d633d34bcb29aabcece83dc78141cba9b52","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.7.0","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"f3e03d633d34bcb29aabcece83dc78141cba9b52","size":1215,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.1.0.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-in-browser-1.1.0.tgz_1483742454857_0.5953066011425108"},"publish_time":1483742457005,"_cnpm_publish_time":1483742457005,"_hasShrinkwrap":false},"1.0.2":{"name":"is-in-browser","version":"1.0.2","description":"Simple check to see if current app is running in browser","main":"dist/index.js","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist","test":"babel-tape-runner test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","babel-tape-runner":"^2.0.1","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","gitHead":"b9adbcbffef757d37d43577af2a68ef8b35765c5","_id":"is-in-browser@1.0.2","_shasum":"f688bea8f1e5aadc3244ebc870d188cfb9b613cf","_from":".","_npmVersion":"3.8.9","_nodeVersion":"6.2.0","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"f688bea8f1e5aadc3244ebc870d188cfb9b613cf","size":1397,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.0.2.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/is-in-browser-1.0.2.tgz_1477149826943_0.7887244820594788"},"publish_time":1477149828400,"_cnpm_publish_time":1477149828400,"_hasShrinkwrap":false},"1.0.1":{"name":"is-in-browser","version":"1.0.1","description":"Simple check to see if current app is running in browser","main":"dist/index.js","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist","test":"babel-node test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","_id":"is-in-browser@1.0.1","_shasum":"3ba9e94028b2fbf442c99906b7b74db79581dd98","_from":".","_npmVersion":"3.7.1","_nodeVersion":"5.5.0","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"3ba9e94028b2fbf442c99906b7b74db79581dd98","size":1295,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.0.1.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-in-browser-1.0.1.tgz_1458011977671_0.6925023938529193"},"publish_time":1458011978418,"_cnpm_publish_time":1458011978418,"_hasShrinkwrap":false},"1.0.0":{"name":"is-in-browser","version":"1.0.0","description":"Simple check to see if current app is running in browser","main":"dist/index.js","jsnext:main":"src/index.js","scripts":{"build":"babel src -d dist","test":"babel-node test/*.js | tap-spec","prepublish":"npm run build"},"keywords":[],"license":"MIT","dependencies":{"babel-polyfill":"^6.3.14"},"devDependencies":{"babel":"^6.3.26","babel-cli":"^6.4.5","babel-eslint":"^4.1.6","babel-preset-es2015":"^6.3.13","babel-preset-stage-2":"^6.3.13","eslint":"^1.10.3","eslint-config-airbnb":"^4.0.0","tap-spec":"^4.1.1","tape":"^4.4.0"},"directories":{"doc":"docs","test":"test"},"repository":{"type":"git","url":"git+https://github.com/tuxsudo/is-in-browser.git"},"author":{"name":"Jared Anderson"},"bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","_id":"is-in-browser@1.0.0","_shasum":"c9032d542e680146276ca5055f63b79098286b99","_from":".","_npmVersion":"3.7.1","_nodeVersion":"5.5.0","_npmUser":{"name":"tuxsudo","email":"jared@tuxsudo.com"},"dist":{"shasum":"c9032d542e680146276ca5055f63b79098286b99","size":2004,"noattachment":false,"key":"/is-in-browser/-/is-in-browser-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-in-browser/download/is-in-browser-1.0.0.tgz"},"maintainers":[{"name":"tuxsudo","email":"jared@tuxsudo.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/is-in-browser-1.0.0.tgz_1458011825041_0.9508427700493485"},"publish_time":1458011825630,"_cnpm_publish_time":1458011825630,"_hasShrinkwrap":false}},"readme":"# Is In Browser?\n\n```js\nimport isBrowser from \"is-in-browser\";\n\nif (isBrowser) {\n  //...\n}\n```\n\nMore thoroughly:\n\n```js\nimport { isJsDom, isNode, isBrowser } from \"is-in-browser\";\n\nif (isBrowser) {\n  // you're in the browser\n  // jsdom considered in browser\n}\n\nif (isJsDom) {\n  // you're in the JSDom\n}\n\nif (isNode) {\n  // you're in the Node\n}\n```\n\n## CommonJS\n\nFor those not using Babel / ES6 Modules\n\n```js\nvar isBrowser = require('is-in-browser').default;\n\nif(isBrowser) { //... }\n```\n","_attachments":{},"homepage":"https://github.com/tuxsudo/is-in-browser#readme","bugs":{"url":"https://github.com/tuxsudo/is-in-browser/issues"},"license":"MIT"}