@dub/utils 0.0.46 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-HJVODQQT.mjs +1 -0
- package/dist/chunk-I5T4HQGY.mjs +1 -0
- package/dist/chunk-IOH2TAGQ.mjs +1 -0
- package/dist/chunk-MZRHVWD5.mjs +1 -0
- package/dist/chunk-NCQTKAIG.mjs +1 -0
- package/dist/chunk-YBJHXOZZ.mjs +1 -0
- package/dist/constants/index.mjs +1 -1
- package/dist/functions/construct-metadata.mjs +1 -1
- package/dist/functions/datetime.d.ts +4 -2
- package/dist/functions/datetime.mjs +1 -1
- package/dist/functions/domains.mjs +1 -1
- package/dist/functions/index.d.ts +1 -1
- package/dist/functions/index.mjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"chrono-node";var g=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},w=t=>{let e=c.parseDate(t);return e||new Date(t)},y=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),m=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},l=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},i=t=>{let e=l();return t>e?e:t},f=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=i(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{g as a,w as b,y as c,m as d,l as e,i as f,f as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as c from"chrono-node";var l=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},g=t=>t instanceof Date?t:c.parseDate(t),m=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),h=t=>new Date(t).toLocaleTimeString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}),w=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},i=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},u=t=>{let e=i();return t>e?e:t},y=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=u(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{l as a,g as b,m as c,h as d,w as e,i as f,u as g,y as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as c from"chrono-node";var u=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},g=t=>{let e=c.parseDate(t);return e||new Date(t)},w=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),y=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},l=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},i=t=>{let e=l();return t>e?e:t},m=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=i(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{u as a,g as b,w as c,y as d,l as e,i as f,m as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as c from"chrono-node";var l=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},g=t=>c.parseDate(t),m=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),h=t=>new Date(t).toLocaleTimeString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}),w=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},i=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},u=t=>{let e=i();return t>e?e:t},y=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=u(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{l as a,g as b,m as c,h as d,w as e,i as f,u as g,y as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as c from"chrono-node";var l=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},g=t=>{let e=c.parseDate(t);return e||new Date(t)},m=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),w=t=>new Date(t).toLocaleTimeString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",hour12:!0}),h=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},i=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},u=t=>{let e=i();return t>e?e:t},y=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=u(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{l as a,g as b,m as c,w as d,h as e,i as f,u as g,y as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"chrono-node";var g=t=>{let e=c.parseDate(t);return e||new Date(t)},w=t=>{let e=t?new Date(t):new Date;return e.toString()==="Invalid Date"?"":new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().split(":").slice(0,2).join(":")},y=t=>new Date(t).toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}),m=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear();if(o>=t)return{firstDay:new Date(r,n,t),lastDay:new Date(r,n+1,t-1)};{let a=n===0?r-1:r,s=n===0?11:n-1;return{firstDay:new Date(a,s,t),lastDay:new Date(r,n,t-1)}}},l=()=>{let t=new Date;return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()},i=t=>{let e=l();return t>e?e:t},f=t=>{let e=new Date,o=e.getDate(),n=e.getMonth(),r=e.getFullYear(),a=i(t);if(o<=a){let s=n===0?11:n-1,D=n===0?r-1:r;return new Date(D,s,a)}else return new Date(r,n,a)};export{g as a,w as b,y as c,m as d,l as e,i as f,f as g};
|
package/dist/constants/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as O,B as P,C as Q,D as R,E as S,F as T,G as U,H as V,I as W,J as X,K as Y,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as I,v as J,w as K,x as L,y as M,z as N}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import{a as p,b as q}from"../chunk-5VUO5P2B.mjs";import{a as r,b as s,c as t,d as u,e as v}from"../chunk-5XTNLJRY.mjs";import{a as H}from"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-
|
|
1
|
+
import{A as O,B as P,C as Q,D as R,E as S,F as T,G as U,H as V,I as W,J as X,K as Y,j as w,k as x,l as y,m as z,n as A,o as B,p as C,q as D,r as E,s as F,t as G,u as I,v as J,w as K,x as L,y as M,z as N}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import{a as p,b as q}from"../chunk-5VUO5P2B.mjs";import{a as r,b as s,c as t,d as u,e as v}from"../chunk-5XTNLJRY.mjs";import{a as H}from"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-I5T4HQGY.mjs";import{a}from"../chunk-YUMUNL66.mjs";import{a as b,b as c,c as d}from"../chunk-N2HN6AOA.mjs";import{a as e,b as f}from"../chunk-SYT2IXG6.mjs";import{a as g,b as h,c as i,d as j}from"../chunk-2SICE2ZS.mjs";import{a as k,b as l,c as m}from"../chunk-OLZMF4V2.mjs";import{a as n,b as o}from"../chunk-FYXE2IZT.mjs";export{Q as ADMIN_HOSTNAMES,l as ALL_TOOLS,P as API_DOMAIN,O as API_HOSTNAMES,M as APP_DOMAIN,N as APP_DOMAIN_WITH_NGROK,L as APP_HOSTNAMES,I as APP_NAME,z as BUSINESS_PLAN,m as COMPARE_PAGES,b as COUNTRIES,c as COUNTRY_CODES,r as DEFAULT_LINK_PROPS,p as DEFAULT_REDIRECTS,t as DICEBEAR_AVATAR_URL,Y as DUB_DEMO_LINKS,W as DUB_DOMAINS,X as DUB_DOMAINS_ARRAY,q as DUB_HEADERS,R as DUB_LOGO,S as DUB_THUMBNAIL,T as DUB_WORKSPACE_ID,A as ENTERPRISE_PLAN,d as EU_COUNTRY_CODES,j as FADE_IN_ANIMATION_SETTINGS,g as FRAMER_MOTION_LIST_ITEM_VARIANTS,x as FREE_PLAN,D as FREE_WORKSPACES_LIMIT,s as GOOGLE_FAVICON_URL,k as HIDE_BACKGROUND_SEGMENTS,K as HOME_DOMAIN,V as LEGAL_USER_ID,U as LEGAL_WORKSPACE_ID,n as LOCALHOST_GEO_DATA,o as LOCALHOST_IP,u as PAGINATION_LIMIT,w as PLANS,y as PRO_PLAN,B as PUBLIC_PLANS,H as SAML_PROVIDERS,e as SECOND_LEVEL_DOMAINS,C as SELF_SERVE_PAID_PLANS,J as SHORT_DOMAIN,f as SPECIAL_APEX_DOMAINS,h as STAGGER_CHILD_VARIANTS,i as SWIPE_REVEAL_ANIMATION_SETTINGS,v as TWO_WEEKS_IN_SECONDS,a as ccTLDs,G as getNextPlan,F as getPlanDetails,E as getPlanFromPriceId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5XTNLJRY.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-
|
|
1
|
+
import{a}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5XTNLJRY.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-I5T4HQGY.mjs";import"../chunk-YUMUNL66.mjs";import"../chunk-N2HN6AOA.mjs";import"../chunk-SYT2IXG6.mjs";import"../chunk-2SICE2ZS.mjs";import"../chunk-OLZMF4V2.mjs";import"../chunk-FYXE2IZT.mjs";export{a as constructMetadata};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
declare const getDateTimeLocal: (timestamp?: Date) => string;
|
|
2
|
-
declare const
|
|
2
|
+
declare const parseDateTime: (str: Date | string) => Date | null;
|
|
3
|
+
declare const formatDate: (datetime: Date | string) => string;
|
|
4
|
+
declare const formatDateTime: (datetime: Date | string) => string;
|
|
3
5
|
declare const getFirstAndLastDay: (day: number) => {
|
|
4
6
|
firstDay: Date;
|
|
5
7
|
lastDay: Date;
|
|
@@ -8,4 +10,4 @@ declare const getLastDayOfMonth: () => number;
|
|
|
8
10
|
declare const getAdjustedBillingCycleStart: (billingCycleStart: number) => number;
|
|
9
11
|
declare const getBillingStartDate: (billingCycleStart: number) => Date;
|
|
10
12
|
|
|
11
|
-
export { formatDate, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth };
|
|
13
|
+
export { formatDate, formatDateTime, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth, parseDateTime };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"../chunk-I5T4HQGY.mjs";export{c as formatDate,d as formatDateTime,g as getAdjustedBillingCycleStart,h as getBillingStartDate,a as getDateTimeLocal,e as getFirstAndLastDay,f as getLastDayOfMonth,b as parseDateTime};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5XTNLJRY.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-
|
|
1
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g,i as h}from"../chunk-TLYJWHCK.mjs";import"../chunk-GGIZK3EO.mjs";import"../chunk-OWYWG4M6.mjs";import"../chunk-I5Y5DKPK.mjs";import"../chunk-MPU6JRPV.mjs";import"../chunk-E3EM6ARH.mjs";import"../chunk-ZJKRLIJQ.mjs";import"../chunk-7REZWZDA.mjs";import"../chunk-ZECUYKGD.mjs";import"../chunk-EMO4MGOU.mjs";import"../chunk-6XPTKHZD.mjs";import"../chunk-AHSNWOXV.mjs";import"../chunk-AZGTG7GS.mjs";import"../chunk-5PD4TPH7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5XTNLJRY.mjs";import"../chunk-PUFZASP4.mjs";import"../chunk-GTQBILTE.mjs";import"../chunk-2OJAP233.mjs";import"../chunk-NEIHTFSW.mjs";import"../chunk-I5T4HQGY.mjs";import"../chunk-YUMUNL66.mjs";import"../chunk-N2HN6AOA.mjs";import"../chunk-SYT2IXG6.mjs";import"../chunk-2SICE2ZS.mjs";import"../chunk-OLZMF4V2.mjs";import"../chunk-FYXE2IZT.mjs";export{a as generateDomainFromName,f as getApexDomain,g as getDomainWithoutWWW,e as getSubdomain,h as isDubDomain,b as validDomainRegex,c as validKeyRegex,d as validSlugRegex};
|
|
@@ -2,7 +2,7 @@ export { capitalize } from './capitalize.js';
|
|
|
2
2
|
export { chunk } from './chunk.js';
|
|
3
3
|
export { cn } from './cn.js';
|
|
4
4
|
export { constructMetadata } from './construct-metadata.js';
|
|
5
|
-
export { formatDate, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth } from './datetime.js';
|
|
5
|
+
export { formatDate, formatDateTime, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth, parseDateTime } from './datetime.js';
|
|
6
6
|
export { deepEqual } from './deep-equal.js';
|
|
7
7
|
export { generateDomainFromName, getApexDomain, getDomainWithoutWWW, getSubdomain, isDubDomain, validDomainRegex, validKeyRegex, validSlugRegex } from './domains.js';
|
|
8
8
|
export { fetchWithTimeout } from './fetch-with-timeout.js';
|
package/dist/functions/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as d,b as
|
|
1
|
+
import{a as d,b as u,c as v,d as w,e as x,f as y,g as z,h as A,i as B}from"../chunk-TLYJWHCK.mjs";import{a as I}from"../chunk-GGIZK3EO.mjs";import{a as J}from"../chunk-OWYWG4M6.mjs";import{a as K}from"../chunk-I5Y5DKPK.mjs";import{a as L}from"../chunk-MPU6JRPV.mjs";import{a as M}from"../chunk-E3EM6ARH.mjs";import{a as N}from"../chunk-ZJKRLIJQ.mjs";import{a as n,b as o,c as p,d as q,e as r,f as s,g as t}from"../chunk-7REZWZDA.mjs";import{a as m}from"../chunk-ZECUYKGD.mjs";import{a as C}from"../chunk-EMO4MGOU.mjs";import{a as D}from"../chunk-6XPTKHZD.mjs";import{a as E,b as F}from"../chunk-AHSNWOXV.mjs";import{a as G}from"../chunk-AZGTG7GS.mjs";import{a as H}from"../chunk-5PD4TPH7.mjs";import"../chunk-5VUO5P2B.mjs";import"../chunk-5XTNLJRY.mjs";import"../chunk-PUFZASP4.mjs";import{a}from"../chunk-GTQBILTE.mjs";import{a as b}from"../chunk-2OJAP233.mjs";import{a as c}from"../chunk-NEIHTFSW.mjs";import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l}from"../chunk-I5T4HQGY.mjs";import"../chunk-YUMUNL66.mjs";import"../chunk-N2HN6AOA.mjs";import"../chunk-SYT2IXG6.mjs";import"../chunk-2SICE2ZS.mjs";import"../chunk-OLZMF4V2.mjs";import"../chunk-FYXE2IZT.mjs";export{a as capitalize,b as chunk,c as cn,d as constructMetadata,r as constructURLFromUTMParams,m as deepEqual,C as fetchWithTimeout,D as fetcher,g as formatDate,h as formatDateTime,u as generateDomainFromName,E as generateMD5Hash,k as getAdjustedBillingCycleStart,z as getApexDomain,l as getBillingStartDate,e as getDateTimeLocal,A as getDomainWithoutWWW,i as getFirstAndLastDay,j as getLastDayOfMonth,q as getParamsFromURL,p as getSearchParams,y as getSubdomain,o as getUrlFromString,t as getUrlWithoutUTMParams,F as hashStringSHA256,B as isDubDomain,G as isIframeable,n as isValidUrl,H as linkConstructor,I as log,K as nFormatter,J as nanoid,s as paramsMetadata,f as parseDateTime,L as timeAgo,M as trim,N as truncate,v as validDomainRegex,w as validKeyRegex,x as validSlugRegex};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { capitalize } from './functions/capitalize.js';
|
|
|
3
3
|
export { chunk } from './functions/chunk.js';
|
|
4
4
|
export { cn } from './functions/cn.js';
|
|
5
5
|
export { constructMetadata } from './functions/construct-metadata.js';
|
|
6
|
-
export { formatDate, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth } from './functions/datetime.js';
|
|
6
|
+
export { formatDate, formatDateTime, getAdjustedBillingCycleStart, getBillingStartDate, getDateTimeLocal, getFirstAndLastDay, getLastDayOfMonth, parseDateTime } from './functions/datetime.js';
|
|
7
7
|
export { deepEqual } from './functions/deep-equal.js';
|
|
8
8
|
export { generateDomainFromName, getApexDomain, getDomainWithoutWWW, getSubdomain, isDubDomain, validDomainRegex, validKeyRegex, validSlugRegex } from './functions/domains.js';
|
|
9
9
|
export { fetchWithTimeout } from './functions/fetch-with-timeout.js';
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as
|
|
1
|
+
import{A as Bo,B as Co,C as Do,D as Eo,E as Fo,F as Go,G as Ho,H as Io,I as Jo,J as Ko,K as Lo,a as z,b as Q,c as R,d as S,e as T,f as U,g as V,h as W,i as X,j as ao,k as bo,l as co,m as go,n as ho,o as io,p as jo,q as ko,r as lo,s as no,t as qo,u as uo,v as vo,w as wo,x as yo,y as zo,z as Ao}from"./chunk-TLYJWHCK.mjs";import{a as eo}from"./chunk-GGIZK3EO.mjs";import{a as fo}from"./chunk-OWYWG4M6.mjs";import{a as mo}from"./chunk-I5Y5DKPK.mjs";import{a as po}from"./chunk-MPU6JRPV.mjs";import{a as to}from"./chunk-E3EM6ARH.mjs";import{a as xo}from"./chunk-ZJKRLIJQ.mjs";import{a as J,b as K,c as L,d as M,e as N,f as O,g as P}from"./chunk-7REZWZDA.mjs";import{a as I}from"./chunk-ZECUYKGD.mjs";import{a as Y}from"./chunk-EMO4MGOU.mjs";import{a as Z}from"./chunk-6XPTKHZD.mjs";import{a as _,b as $}from"./chunk-AHSNWOXV.mjs";import{a as oo}from"./chunk-AZGTG7GS.mjs";import{a as ro}from"./chunk-5PD4TPH7.mjs";import{a as j,b as k}from"./chunk-5VUO5P2B.mjs";import{a as l,b as n,c as q,d as s,e as u}from"./chunk-5XTNLJRY.mjs";import{a as so}from"./chunk-PUFZASP4.mjs";import{a as v}from"./chunk-GTQBILTE.mjs";import{a as w}from"./chunk-2OJAP233.mjs";import{a as y}from"./chunk-NEIHTFSW.mjs";import{a as A,b as B,c as C,d as D,e as E,f as F,g as G,h as H}from"./chunk-I5T4HQGY.mjs";import{a as o}from"./chunk-YUMUNL66.mjs";import{a as r,b as e,c as f}from"./chunk-N2HN6AOA.mjs";import{a as m,b as p}from"./chunk-SYT2IXG6.mjs";import{a as t,b as x,c as a,d as b}from"./chunk-2SICE2ZS.mjs";import{a as c,b as d,c as g}from"./chunk-OLZMF4V2.mjs";import{a as h,b as i}from"./chunk-FYXE2IZT.mjs";export{Do as ADMIN_HOSTNAMES,d as ALL_TOOLS,Co as API_DOMAIN,Bo as API_HOSTNAMES,zo as APP_DOMAIN,Ao as APP_DOMAIN_WITH_NGROK,yo as APP_HOSTNAMES,uo as APP_NAME,go as BUSINESS_PLAN,g as COMPARE_PAGES,r as COUNTRIES,e as COUNTRY_CODES,l as DEFAULT_LINK_PROPS,j as DEFAULT_REDIRECTS,q as DICEBEAR_AVATAR_URL,Lo as DUB_DEMO_LINKS,Jo as DUB_DOMAINS,Ko as DUB_DOMAINS_ARRAY,k as DUB_HEADERS,Eo as DUB_LOGO,Fo as DUB_THUMBNAIL,Go as DUB_WORKSPACE_ID,ho as ENTERPRISE_PLAN,f as EU_COUNTRY_CODES,b as FADE_IN_ANIMATION_SETTINGS,t as FRAMER_MOTION_LIST_ITEM_VARIANTS,bo as FREE_PLAN,ko as FREE_WORKSPACES_LIMIT,n as GOOGLE_FAVICON_URL,c as HIDE_BACKGROUND_SEGMENTS,wo as HOME_DOMAIN,Io as LEGAL_USER_ID,Ho as LEGAL_WORKSPACE_ID,h as LOCALHOST_GEO_DATA,i as LOCALHOST_IP,s as PAGINATION_LIMIT,ao as PLANS,co as PRO_PLAN,io as PUBLIC_PLANS,so as SAML_PROVIDERS,m as SECOND_LEVEL_DOMAINS,jo as SELF_SERVE_PAID_PLANS,vo as SHORT_DOMAIN,p as SPECIAL_APEX_DOMAINS,x as STAGGER_CHILD_VARIANTS,a as SWIPE_REVEAL_ANIMATION_SETTINGS,u as TWO_WEEKS_IN_SECONDS,v as capitalize,o as ccTLDs,w as chunk,y as cn,z as constructMetadata,N as constructURLFromUTMParams,I as deepEqual,Y as fetchWithTimeout,Z as fetcher,C as formatDate,D as formatDateTime,Q as generateDomainFromName,_ as generateMD5Hash,G as getAdjustedBillingCycleStart,V as getApexDomain,H as getBillingStartDate,A as getDateTimeLocal,W as getDomainWithoutWWW,E as getFirstAndLastDay,F as getLastDayOfMonth,qo as getNextPlan,M as getParamsFromURL,no as getPlanDetails,lo as getPlanFromPriceId,L as getSearchParams,U as getSubdomain,K as getUrlFromString,P as getUrlWithoutUTMParams,$ as hashStringSHA256,X as isDubDomain,oo as isIframeable,J as isValidUrl,ro as linkConstructor,eo as log,mo as nFormatter,fo as nanoid,O as paramsMetadata,B as parseDateTime,po as timeAgo,to as trim,xo as truncate,R as validDomainRegex,S as validKeyRegex,T as validSlugRegex};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dub/utils",
|
|
3
3
|
"description": "Utility functions and constants for Dub.co",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.47",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@sindresorhus/slugify": "^2.2.1",
|
|
34
|
+
"chrono-node": "^2.7.5",
|
|
34
35
|
"clsx": "^2.1.0",
|
|
35
36
|
"ms": "^2.1.3",
|
|
36
37
|
"nanoid": "^5.0.1",
|