clock-format-utility
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,1 +0,1 @@ | ||
Object.defineProperty(exports,"__esModule",{value:true});var detectDeviceLocale=exports.detectDeviceLocale=function detectDeviceLocale(){try{var deviceInfo=require('react-native-device-info');return deviceInfo.getDeviceLocale();}catch(e){return navigator.language;}};var detectDeviceClockFormat=exports.detectDeviceClockFormat=function detectDeviceClockFormat(){var locale=arguments.length>0&&arguments[0]!==undefined?arguments[0]:detectDeviceLocale();var timeString=new Date().toLocaleString(locale);var foundAMorPM=timeString.indexOf('AM')>-1||timeString.indexOf('PM')>-1;return foundAMorPM?'12':'24';};exports.default={detectDeviceClockFormat:detectDeviceClockFormat,detectDeviceLocale:detectDeviceLocale}; | ||
Object.defineProperty(exports,"__esModule",{value:true});var detectDeviceLocale=exports.detectDeviceLocale=function detectDeviceLocale(){try{var deviceInfo=require('react-native-device-info');return deviceInfo.getDeviceLocale();}catch(e){return window.navigator.languages&&window.navigator.languages.length>0?window.navigator.languages[0]:window.navigator.language||window.navigator.userLanguage;}};var detectDeviceClockFormat=exports.detectDeviceClockFormat=function detectDeviceClockFormat(){var locale=arguments.length>0&&arguments[0]!==undefined?arguments[0]:detectDeviceLocale();var timeString=new Date().toLocaleString(locale);var foundAMorPM=timeString.indexOf('AM')>-1||timeString.indexOf('PM')>-1;return foundAMorPM?'12':'24';};exports.default={detectDeviceClockFormat:detectDeviceClockFormat,detectDeviceLocale:detectDeviceLocale}; |
{ | ||
"name": "clock-format-utility", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Utility that can detect clock format (12/24 hour) and can set clock format for moment", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6523