Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcoworms/am-i-in-browser
A function do determine whether your script is running on node or browser environment.
https://github.com/marcoworms/am-i-in-browser
Last synced: about 1 month ago
JSON representation
A function do determine whether your script is running on node or browser environment.
- Host: GitHub
- URL: https://github.com/marcoworms/am-i-in-browser
- Owner: MarcoWorms
- Created: 2016-10-11T21:29:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-11T21:46:57.000Z (over 8 years ago)
- Last Synced: 2024-12-14T09:09:51.480Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
`npm install am-i-in-browser --save`
```javascript
const isBrowser = require('am-i-in-browser')if (isBrowser()) {
console.log('you are running this in a browser!')
} else {
console.log('you are running this in node!')
}
```