-
Notifications
You must be signed in to change notification settings - Fork 4
/
constants.js
58 lines (52 loc) · 1.17 KB
/
constants.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export const EMAIL_REGEX =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
export const URL_REGEX =
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g
// These are the most common words in UK addresses.
export const ADDRESS_WORDS = [
'house',
'flat',
'road',
'close',
'lane',
'drive',
'avenue',
'street',
'way',
'court',
'place',
'gardens',
'crescent',
'park',
'grove',
'terrace',
]
export const DAY_WORDS = [
'mon',
'tue',
'wed',
'thu',
'fri',
'sat',
'sun',
'monday',
'tuesday',
'wednesday',
'thursday',
'friday',
'saturday',
'sunday',
'today',
'tomorrow',
'this afternoon',
'this evening',
'tonight',
]
export const MAX_MAP_ZOOM = 14
export const RECENT_MESSAGES = 31
export const OWN_POSTS_AGE = 120
export const MESSAGE_EXPIRE_TIME = 90
export const GROUP_REPOSTS = { offer: 3, wanted: 14, max: 10, chaseups: 2 }
export const TYPING_TIME_INVERVAL = 10000
// The 37 miles figure comes from research from someone we shall call Clement.
export const FAR_AWAY = 37