Skip to content

Commit

Permalink
fixed readme example typo
Browse files Browse the repository at this point in the history
  • Loading branch information
abhirathore2006 committed Feb 23, 2017
1 parent dc33a71 commit 0ef4364
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm install --save detect-is-node
```js
var isNode = require('detect-is-node');

if (isNode) {
if (isNode()) {
console.log("Running under node Environment");
} else {
console.log("Running in browser");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "detect-is-node",
"version": "1.0.2",
"version": "1.0.3",
"description": "check if running under node environment or browser",
"main": "index.js",
"scripts": {
Expand Down
7 changes: 6 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
var isNode = require('./index.js');
console.log(isNode());
if (isNode()) {
console.log("Running under node Environment");
} else {
console.log("Running in browser");
}

0 comments on commit 0ef4364

Please sign in to comment.