Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkOGDev committed Mar 21, 2018
1 parent 7356ce6 commit f11a8a3
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,42 @@

Use to check if JavaScript Code is on the client or server.

# Install
https://www.npmjs.com/package/is-client-side

## Methods
```
npm install is-client-side
```


## API

```
IsClientSide.true()
```

Name | Type | Return Type | Usage | Action
--- | --- | --- | --- | ---
true() | Static | Boolean | IsClientSide.true() | Returns ***True*** if ***all*** our client side checks are true. Meaning code is executing on the client side (e.g. in the browser).
false() | Static | Boolean | IsClientSide.false() | Returns ***True*** if ***any*** client side checks are false. Meaning code is executing on the server side (e.g. in Node).
windowAvailable() | Static | Boolean | IsClientSide.windowAvailable() | Returns ***True*** if Window Is available.
documentAvailable() | Static | Boolean | IsClientSide.documentAvailable() | Returns ***True*** if Document is Available.
* Return Type: Boolean
* Action: Returns ***True*** if ***all*** our client side checks are true. Meaning code is executing on the client side (e.g. in the browser).

```
IsClientSide.false()
```
* Return Type: Boolean
* Action: Returns ***True*** if ***any*** client side checks are false. Meaning code is executing on the server side (e.g. in Node).
*
```
IsClientSide.windowAvailable()
```
* Return Type: Boolean
* Action: Returns ***True*** if Window Is available.
*
```
IsClientSide.documentAvailable()
```
* Return Type: Boolean
* Action: Returns ***True*** if Document is Available.



All functions return only True or False. No need to worry about 'undefined'.

Expand Down

0 comments on commit f11a8a3

Please sign in to comment.