Socket
Socket
Sign inDemoInstall

clock-format-utility

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clock-format-utility - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

lib/detect.js

@@ -1,1 +0,1 @@

Object.defineProperty(exports,"__esModule",{value:true});var specificClockConfig={'en-SV':'24'};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();if(specificClockConfig[locale]){return specificClockConfig[locale];}var timeString=new Date().toLocaleTimeString(locale),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 specificClockConfig={'en-SV':'24'};var detectDeviceLocale=exports.detectDeviceLocale=function detectDeviceLocale(){try{var deviceInfo=require('react-native-device-info');return deviceInfo.getDeviceLocale();}catch(e){try{return window.navigator.languages&&window.navigator.languages.length>0?window.navigator.languages[0]:window.navigator.language||window.navigator.userLanguage;}catch(ex){return'en-US';}}};var detectDeviceClockFormat=exports.detectDeviceClockFormat=function detectDeviceClockFormat(){var locale=arguments.length>0&&arguments[0]!==undefined?arguments[0]:detectDeviceLocale();if(specificClockConfig[locale]){return specificClockConfig[locale];}var timeString=new Date().toLocaleTimeString(locale),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.4",
"version": "0.0.5",
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc