node's os API in React Native
This module is used by Peel
-
Create a new react-native project. Check react-native getting started
-
In your project dir:
npm install react-native-os --save
Note for iOS: If your react-native version < 0.40 install with this tag instead:
npm install [email protected] --save
react-native link react-native-os
Step 3 Profit
only if you want to write require('os') in your javascript
{
"react-native": {
"os": "react-native-os"
}
}
PR's welcome!