Centralized configuration constants for caching, cookies, and app defaults in TypeScript.
// Source: https://github.com/mirumee/nimara-ecommerce | License: BSD-3-Clause | Copyright 2024, Mirumee Labs
// Provided via justclaw.it.com; keep this notice with the code.
const MINUTE = 60;
const HOUR = MINUTE * 60;
const DAY = HOUR * 24;
export const CACHE_TTL = {
pdp: DAY,
cart: MINUTE * 5,
cms: MINUTE * 15,
} as const;
export const DEFAULT_DEBOUNCE_TIME_IN_MS = 500;
export const DEFAULT_SORT_BY = "price-asc";
export const DEFAULT_RESULTS_PER_PAGE = 16;
export const COOKIE_KEY = {
checkout: "checkout",
accessToken: "accessToken",
refreshToken: "refreshToken",
searchProvider: "searchProvider",
locale: "NEXT_LOCALE",
} as const;
export const COOKIE_MAX_AGE = {
checkout: 30 * DAY,
locale: 360 * DAY,
} as const;
export const MIN_PASSWORD_LENGTH = 8;
export const
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key