2.0.4 • Published 7 years ago

joshua-platform v2.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

Platform

Will add checked classes to html tag automatic.

If match the platform, will return true, and add the class name below.

if not match the platform, will return false, and add the class name not-{className} or no-touch.

usage

css

.desktop{
  // style for desktop platform
}

.ie11{
  // style for IE11 platform
}

.iphone{
  // style for iPhone platform
}

js

import Platform from 'joshua-platform';

if(Platform.isIE) {
  // do something on IE
}

if(Platform.isiPad) {
  // do something on iPad
}
static propertyclass namedesktop
isDesktopdesktopdesktop browser
isIEieIE brwoser
isIE11ie11IE11 brwoser
isEdgeedgeEdge brwoser
isChromechromeChrome brwoser
isFirefoxfirefoxFirefox brwoser
isSafarisafariSafari brwoser
isSamsungNativesamsungnativesamsung native brwoser
isTablettablettablet device
isiPadipadiPad device
isAndroidPadandroidpadAndroid tablet device
isNexus7nexus7Google Nexus7 device
isMobilemobilemobile device
isiPhoneiphoneiPhone device
isS4s4samsung S4 device
isS5s5samsungS5 device
isS6s6samsungS6 device
isS7s7samsungS7 device
isIOSiosIOS device
isAndroidandroidAndroid device
hasTouchhas-touchtouch screen device
isMacmacmac os system
isWindowswindowswindows system
2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago