You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
memos/web/src/helpers/consts.ts

24 lines
575 B
TypeScript

// UNKNOWN_ID is the symbol for unknown id
export const UNKNOWN_ID = -1;
// default animation duration
4 years ago
export const ANIMATION_DURATION = 200;
// toast animation duration
4 years ago
export const TOAST_ANIMATION_DURATION = 400;
// millisecond in a day
4 years ago
export const DAILY_TIMESTAMP = 3600 * 24 * 1000;
// tag regex
export const TAG_REG = /#\s?(.+?)\s/g;
4 years ago
// URL regex
4 years ago
export const LINK_REG = /(https?:\/\/[^\s<\\*>']+)/g;
// image regex
export const IMAGE_URL_REG = /([^\s<\\*>']+\.(jpeg|jpg|gif|png|svg))/g;
4 years ago
// linked memo regex
4 years ago
export const MEMO_LINK_REG = /\[@(.+?)\]\((.+?)\)/g;