Skip to content

Commit

Permalink
Add top level Platform doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Meiguro committed Apr 17, 2016
1 parent 79a4af7 commit a5c3817
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,17 @@ Wakeup.schedule(
## Platform
[Platform]: #platform

The Platform module allows you to determine the current platform runtime on the watch through its `Platform.version` method. This is to be used when the [Feature] module does not give enough ability to discern whether a feature exists or not.
`Platform` provides a module of the same name `Platform` and a feature detection module [Feature].

````js
var Platform = require('platform');
console.log('Current platform is ' + Platform.version());
````

### Platform.version()
### Platform

The Platform module allows you to determine the current platform runtime on the watch through its `Platform.version` method. This is to be used when the [Feature] module does not give enough ability to discern whether a feature exists or not.

#### Platform.version()

`Platform.version` returns the current platform version name as a lowercase string. This can be `'aplite'`, `'basalt'`, or `'chalk'`. Use the following table to determine the platform that `Platform.version` will return.

Expand All @@ -244,6 +247,10 @@ console.log('Current platform is ' + Platform.version());
| Pebble Time Steel | `'basalt'` |
| Pebble Time Round | `'chalk'` |

````js
console.log('Current platform is ' + Platform.version());
````

### Feature
[Feature]: #feature

Expand Down

0 comments on commit a5c3817

Please sign in to comment.