Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.2 to 0.0.3

2

lib/detect.js

@@ -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",

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