@deboxsoft/module-core
Advanced tools
Comparing version 2.5.28 to 2.5.29
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "2.5.28", | ||
"version": "2.5.29", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -36,3 +36,3 @@ "maintainers": [ | ||
"shallow-clone": "^3.0.1", | ||
"universal-base64": "^2.1.0", | ||
"js-base64": "^3.7.2", | ||
"mustache": "^4.2.0" | ||
@@ -39,0 +39,0 @@ }, |
@@ -1,3 +0,1 @@ | ||
import { decode, encode } from "universal-base64"; | ||
export const base64 = { decode, encode }; | ||
export { Base64 as base64 } from "js-base64"; |
@@ -1,3 +0,2 @@ | ||
import dayjsBase from "dayjs/esm/index"; | ||
import dayjs from "dayjs/esm"; | ||
import utc from "dayjs/esm/plugin/utc"; | ||
@@ -8,8 +7,11 @@ import timezone from "dayjs/esm/plugin/timezone"; | ||
import isSameAfter from "dayjs/esm/plugin/isSameOrBefore"; | ||
dayjsBase.extend(utc); | ||
dayjsBase.extend(timezone); | ||
dayjsBase.extend(localeData); | ||
dayjsBase.extend(isSameBefore); | ||
dayjsBase.extend(isSameAfter); | ||
import minMax from "dayjs/esm/plugin/minMax"; | ||
dayjs.extend(utc); | ||
dayjs.extend(timezone); | ||
dayjs.extend(localeData); | ||
dayjs.extend(isSameBefore); | ||
dayjs.extend(isSameAfter); | ||
dayjs.extend(minMax); | ||
type Options = { | ||
@@ -25,56 +27,6 @@ timezone?: string; | ||
type WeekdayNames = [string, string, string, string, string, string, string]; | ||
type MonthNames = [ | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string, | ||
string | ||
]; | ||
interface InstanceLocaleDataReturn { | ||
firstDayOfWeek(): number; | ||
weekdays(instance?: Dayjs): WeekdayNames; | ||
weekdaysShort(instance?: Dayjs): WeekdayNames; | ||
weekdaysMin(instance?: Dayjs): WeekdayNames; | ||
months(instance?: Dayjs): MonthNames; | ||
monthsShort(instance?: Dayjs): MonthNames; | ||
longDateFormat(format: string): string; | ||
meridiem(hour?: number, minute?: number, isLower?: boolean): string; | ||
} | ||
interface GlobalLocaleDataReturn { | ||
firstDayOfWeek(): number; | ||
weekdays(): WeekdayNames; | ||
weekdaysShort(): WeekdayNames; | ||
weekdaysMin(): WeekdayNames; | ||
months(): MonthNames; | ||
monthsShort(): MonthNames; | ||
longDateFormat(format: string): string; | ||
meridiem(hour?: number, minute?: number, isLower?: boolean): string; | ||
} | ||
export interface Dayjs extends Omit<dayjsBase.Dayjs, "utcOffset" | "utc" | "local" | "tz"> { | ||
utc(keepLocalTime?: boolean): Dayjs; | ||
local(): Dayjs; | ||
isUTC(): boolean; | ||
utcOffset(offset?: number | string, keepLocalTime?: boolean): Dayjs; | ||
tz(timezone?: string, keepLocalTime?: boolean): Dayjs; | ||
offsetName(type?: "short" | "long"): string | undefined; | ||
localeData(): InstanceLocaleDataReturn; | ||
isSameOrBefore(date: dayjsBase.ConfigType, unit?: dayjsBase.OpUnitType): boolean; | ||
isSameOrBefore(date: dayjsBase.ConfigType, unit?: dayjsBase.OpUnitType): boolean; | ||
} | ||
export function dayjs( | ||
d: string | number | Dayjs | Date = new Date(), | ||
export function dayTimeZone( | ||
d: string | number | dayjs.Dayjs | Date = new Date(), | ||
{ format, timezone = "Asia/Jakarta" }: Options = {} | ||
): Dayjs { | ||
): dayjs.Dayjs { | ||
if (format) { | ||
@@ -87,3 +39,3 @@ // @ts-ignore | ||
} | ||
export const dateLocaleData: GlobalLocaleDataReturn = dayjsBase.localeData(); | ||
export const dateLocaleData: dayjs.GlobalLocaleDataReturn = dayjs.localeData(); | ||
/** | ||
@@ -110,1 +62,3 @@ * range startDate and endDate | ||
}; | ||
export { dayjs }; |
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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
887587
12354
+ Addedjs-base64@^3.7.2
+ Addedjs-base64@3.7.7(transitive)
- Removeduniversal-base64@^2.1.0
- Removeduniversal-base64@2.1.0(transitive)