Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ronniechong/browser-or-node
Check for browser or node environment
https://github.com/ronniechong/browser-or-node
Last synced: about 1 month ago
JSON representation
Check for browser or node environment
- Host: GitHub
- URL: https://github.com/ronniechong/browser-or-node
- Owner: ronniechong
- License: mit
- Created: 2020-04-06T08:53:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T10:35:03.000Z (almost 2 years ago)
- Last Synced: 2024-08-10T09:34:33.988Z (5 months ago)
- Language: JavaScript
- Size: 884 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# browser-or-node
![NPM](https://img.shields.io/npm/l/@digitalronin/browser-or-node)
[![npm (scoped)](https://img.shields.io/npm/v/@digitalronin/browser-or-node)](https://npmjs.org/package/@digitalronin/browser-or-node "View this project on npm")
[![Build Status](https://travis-ci.com/ronniechong/browser-or-node.svg?branch=master)](https://travis-ci.com/ronniechong/browser-or-node)Check for browser or node environment
## Installing
```
# using NPM
> npm install @digitalronin/browser-or-node -S# using Yarn
> yarn add @digitalronin/browser-or-node --save
```## Running
```javascript
const { isNode, isBrowser, getInfo } = require('browser-or-node');
console.log(isNode());
console.log(isBrowser());
console.log(getInfo());
```