File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
# Browser or Node.js
2
2
[ ![ Build Status] ( https://travis-ci.org/flexdinesh/browser-or-node.svg?branch=master )] ( https://travis-ci.org/flexdinesh/browser-or-node )
3
- [ ![ npm version] ( https://badge.fury.io/js/brower -or-node.svg )] ( https://www.npmjs.com/package/brower -or-node )
4
- [ ![ dependencies Status] ( https://david-dm.org/flexdinesh/brower -or-node/status.svg )] ( https://david-dm.org/flexdinesh/brower -or-node )
3
+ [ ![ npm version] ( https://badge.fury.io/js/browser -or-node.svg )] ( https://www.npmjs.com/package/browser -or-node )
4
+ [ ![ dependencies Status] ( https://david-dm.org/flexdinesh/browser -or-node/status.svg )] ( https://david-dm.org/flexdinesh/browser -or-node )
5
5
[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
6
- [ ![ npm] ( https://img.shields.io/npm/dt/brower -or-node.svg )] ( https://www.npmjs.com/package/brower -or-node )
6
+ [ ![ npm] ( https://img.shields.io/npm/dt/browser -or-node.svg )] ( https://www.npmjs.com/package/browser -or-node )
7
7
8
8
Check whether the code is running in the browser or node.js runtime.
9
9
10
10
## Install
11
11
12
12
```
13
- $ npm install --save brower -or-node
13
+ $ npm install --save browser -or-node
14
14
```
15
15
16
16
## Usage
17
17
18
18
ES6 style import
19
19
``` js
20
- import { isBrowser , isNode } from ' brower -or-node' ;
20
+ import { isBrowser , isNode } from ' browser -or-node' ;
21
21
22
22
if (isBrowser) {
23
23
// do browser only stuff
@@ -30,7 +30,7 @@ if (isNode) {
30
30
```
31
31
ES5 style import
32
32
``` js
33
- var jsEnv = require (' brower -or-node' );
33
+ var jsEnv = require (' browser -or-node' );
34
34
35
35
if (jsEnv .isBrowser ) {
36
36
// do browser only stuff
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " brower -or-node" ,
2
+ "name" : " browser -or-node" ,
3
3
"version" : " 1.0.0" ,
4
4
"description" : " Check where the code is running in the browser or node.js" ,
5
5
"main" : " ./lib/index.js" ,
20
20
],
21
21
"repository" : {
22
22
"type" : " git" ,
23
- "url" : " git+https://github.com/flexdinesh/brower -or-node.git"
23
+ "url" : " git+https://github.com/flexdinesh/browser -or-node.git"
24
24
},
25
25
"keywords" : [
26
26
" npm" ,
34
34
"author" :
" Dineshkumar Pandiyan <[email protected] >" ,
35
35
"license" : " MIT" ,
36
36
"bugs" : {
37
- "url" : " https://github.com/flexdinesh/brower -or-node/issues"
37
+ "url" : " https://github.com/flexdinesh/browser -or-node/issues"
38
38
},
39
- "homepage" : " https://github.com/flexdinesh/brower -or-node#readme" ,
39
+ "homepage" : " https://github.com/flexdinesh/browser -or-node#readme" ,
40
40
"devDependencies" : {
41
41
"babel" : " ^6.23.0" ,
42
42
"babel-cli" : " ^6.26.0" ,
You can’t perform that action at this time.
0 commit comments