New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@universe/util

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@universe/util - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

17

dist/cjs/src/index.d.ts

@@ -86,1 +86,18 @@ export declare const isNull: (v: unknown) => v is null;

export declare const utcHourToLocal: (hour: number) => number;
declare enum TimeZone {
US_ALASKA = "US/Alaska",
US_ALEUTIAN = "US/Aleutian",
US_ARIZONA = "US/Arizona",
US_CENTRAL = "US/Central",
US_EAST_INDIANA = "US/East-Indiana",
US_EASTERN = "US/Eastern",
US_HAWAII = "US/Hawaii",
US_INDIANA_STARKE = "US/Indiana-Starke",
US_MICHIGAN = "US/Michigan",
US_MOUNTAIN = "US/Mountain",
US_PACIFIC = "US/Pacific",
US_SAMOA = "US/Samoa",
ETC_GMT = "Etc/GMT"
}
export declare function getTimezone(): TimeZone;
export {};

@@ -86,1 +86,18 @@ export declare const isNull: (v: unknown) => v is null;

export declare const utcHourToLocal: (hour: number) => number;
declare enum TimeZone {
US_ALASKA = "US/Alaska",
US_ALEUTIAN = "US/Aleutian",
US_ARIZONA = "US/Arizona",
US_CENTRAL = "US/Central",
US_EAST_INDIANA = "US/East-Indiana",
US_EASTERN = "US/Eastern",
US_HAWAII = "US/Hawaii",
US_INDIANA_STARKE = "US/Indiana-Starke",
US_MICHIGAN = "US/Michigan",
US_MOUNTAIN = "US/Mountain",
US_PACIFIC = "US/Pacific",
US_SAMOA = "US/Samoa",
ETC_GMT = "Etc/GMT"
}
export declare function getTimezone(): TimeZone;
export {};

2

package.json
{
"name": "@universe/util",
"version": "1.4.0",
"version": "1.4.1",
"main": "dist/cjs/src/index.js",

@@ -5,0 +5,0 @@ "description": "Universe development utilities.",

@@ -491,1 +491,51 @@ /* eslint-disable max-len */

};
enum TimeZone {
US_ALASKA = 'US/Alaska',
US_ALEUTIAN = 'US/Aleutian',
US_ARIZONA = 'US/Arizona',
US_CENTRAL = 'US/Central',
US_EAST_INDIANA = 'US/East-Indiana',
US_EASTERN = 'US/Eastern',
US_HAWAII = 'US/Hawaii',
US_INDIANA_STARKE = 'US/Indiana-Starke',
US_MICHIGAN = 'US/Michigan',
US_MOUNTAIN = 'US/Mountain',
US_PACIFIC = 'US/Pacific',
US_SAMOA = 'US/Samoa',
ETC_GMT = 'Etc/GMT', // Greenwich time
}
export function getTimezone(): TimeZone {
const tmp = Intl.DateTimeFormat().resolvedOptions().timeZone;
if (tmp in TimeZone) { return tmp as TimeZone; }
switch(tmp) {
case 'America/Anchorage':
return TimeZone.US_ALASKA;
case 'America/Adak':
return TimeZone.US_ALEUTIAN;
case 'America/Phoenix':
return TimeZone.US_ARIZONA;
case 'America/Chicago':
return TimeZone.US_CENTRAL;
case 'America/Indiana/Indianapolis':
return TimeZone.US_EAST_INDIANA;
case 'America/New_York':
return TimeZone.US_EASTERN;
case 'America/Indiana/Knox':
return TimeZone.US_INDIANA_STARKE;
case 'America/Detroit':
return TimeZone.US_MICHIGAN;
case 'America/Denver':
return TimeZone.US_MOUNTAIN;
case 'Pacific/Honolulu':
return TimeZone.US_HAWAII;
case 'America/Los_Angeles':
return TimeZone.US_PACIFIC;
case 'Pacific/Pago_Pago':
return TimeZone.US_SAMOA;
default:
return TimeZone.US_PACIFIC;
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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