Skip to content

huychau/react-native-os-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-os-helper

A simple library help you detect which OS Platform you are running and iPhone helper methods

Installing

npm i react-native-os-helper

APIs

isIOS

This variable help to detech is iOS

Return true if you running on iOS device

isIPhoneX()

This method help to detect if you on iPhone X device

Return true if you running on iPhone X, XR, XS device

isAndroid

This variable help to detect is Android

Return true if you running on Android device

Example:

import { isIOS } from 'react-native-os-helper'

// ...

if (isIOS) {
  // do something
} else {
  // do something
}

Releases

No releases published

Packages

No packages published