-
-
Notifications
You must be signed in to change notification settings - Fork 153
/
utilities.js
41 lines (38 loc) · 1.02 KB
/
utilities.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
const _ = require('lodash');
const ajc = require('array-join-conjunction');
const dashify = require('dashify');
const hljs = require('highlight.js');
const humanize = require('humanize-string');
const isBot = require('isbot');
const isSANB = require('is-string-and-not-blank');
const dayjs = require('dayjs');
const numeral = require('numeral');
const pluralize = require('pluralize');
const reservedEmailAddressesList = require('reserved-email-addresses-list');
const striptags = require('striptags');
const titleize = require('titleize');
const toEmoji = require('gemoji/name-to-emoji');
const validator = require('validator');
const { boolean } = require('boolean');
const json = (string, replacer = null, space = 2) =>
JSON.stringify(string, replacer, space);
const emoji = (string) => (toEmoji[string] ? toEmoji[string] : '');
module.exports = {
_,
ajc,
boolean,
dashify,
emoji,
hljs,
humanize,
isBot,
isSANB,
json,
dayjs,
numeral,
pluralize,
reservedEmailAddressesList,
striptags,
titleize,
validator
};