@onivoro/isomorphic-common 24.16.0 → 24.19.0
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/package.json +4 -4
- package/src/index.d.ts +74 -0
- package/src/index.js +75 -0
- package/src/index.js.map +1 -0
- package/src/lib/constants/api-id-header.constant.d.ts +1 -0
- package/src/lib/constants/api-id-header.constant.js +2 -0
- package/src/lib/constants/api-id-header.constant.js.map +1 -0
- package/src/lib/constants/api-key-header.constant.d.ts +1 -0
- package/src/lib/constants/api-key-header.constant.js +2 -0
- package/src/lib/constants/api-key-header.constant.js.map +1 -0
- package/src/lib/constants/auth-cookie-name.constant.d.ts +1 -0
- package/src/lib/constants/auth-cookie-name.constant.js +3 -0
- package/src/lib/constants/auth-cookie-name.constant.js.map +1 -0
- package/src/lib/constants/millis-per-day.constant.d.ts +1 -0
- package/src/lib/constants/millis-per-day.constant.js +3 -0
- package/src/lib/constants/millis-per-day.constant.js.map +1 -0
- package/src/lib/constants/millis-per-hour.constant.d.ts +1 -0
- package/src/lib/constants/millis-per-hour.constant.js +3 -0
- package/src/lib/constants/millis-per-hour.constant.js.map +1 -0
- package/src/lib/constants/millis-per-minute.constant.d.ts +1 -0
- package/src/lib/constants/millis-per-minute.constant.js +2 -0
- package/src/lib/constants/millis-per-minute.constant.js.map +1 -0
- package/src/lib/constants/regexes.constant.d.ts +30 -0
- package/src/lib/constants/regexes.constant.js +31 -0
- package/src/lib/constants/regexes.constant.js.map +1 -0
- package/src/lib/functions/add-offset.function.d.ts +1 -0
- package/src/lib/functions/add-offset.function.js +11 -0
- package/src/lib/functions/add-offset.function.js.map +1 -0
- package/src/lib/functions/arrange-act-assert.function.d.ts +7 -0
- package/src/lib/functions/arrange-act-assert.function.js +18 -0
- package/src/lib/functions/arrange-act-assert.function.js.map +1 -0
- package/src/lib/functions/camel-case.function.d.ts +20 -0
- package/src/lib/functions/camel-case.function.js +28 -0
- package/src/lib/functions/camel-case.function.js.map +1 -0
- package/src/lib/functions/chunk.function.d.ts +1 -0
- package/src/lib/functions/chunk.function.js +21 -0
- package/src/lib/functions/chunk.function.js.map +1 -0
- package/src/lib/functions/convert-object-to-literal.function.d.ts +1 -0
- package/src/lib/functions/convert-object-to-literal.function.js +7 -0
- package/src/lib/functions/convert-object-to-literal.function.js.map +1 -0
- package/src/lib/functions/format-usd.function.d.ts +1 -0
- package/src/lib/functions/format-usd.function.js +5 -0
- package/src/lib/functions/format-usd.function.js.map +1 -0
- package/src/lib/functions/from-boolean-string.function.d.ts +1 -0
- package/src/lib/functions/from-boolean-string.function.js +4 -0
- package/src/lib/functions/from-boolean-string.function.js.map +1 -0
- package/src/lib/functions/from-calendar-date.function.d.ts +1 -0
- package/src/lib/functions/from-calendar-date.function.js +5 -0
- package/src/lib/functions/from-calendar-date.function.js.map +1 -0
- package/src/lib/functions/from-csv-string.function.d.ts +1 -0
- package/src/lib/functions/from-csv-string.function.js +4 -0
- package/src/lib/functions/from-csv-string.function.js.map +1 -0
- package/src/lib/functions/get-date-last-month.function.d.ts +1 -0
- package/src/lib/functions/get-date-last-month.function.js +6 -0
- package/src/lib/functions/get-date-last-month.function.js.map +1 -0
- package/src/lib/functions/get-date-range-for-month.function copy.d.ts +4 -0
- package/src/lib/functions/get-date-range-for-month.function copy.js +7 -0
- package/src/lib/functions/get-date-range-for-month.function copy.js.map +1 -0
- package/src/lib/functions/get-date-range-for-month.function.d.ts +4 -0
- package/src/lib/functions/get-date-range-for-month.function.js +7 -0
- package/src/lib/functions/get-date-range-for-month.function.js.map +1 -0
- package/src/lib/functions/get-tag.function.d.ts +1 -0
- package/src/lib/functions/get-tag.function.js +9 -0
- package/src/lib/functions/get-tag.function.js.map +1 -0
- package/src/lib/functions/get-user-full-name.function.d.ts +2 -0
- package/src/lib/functions/get-user-full-name.function.js +4 -0
- package/src/lib/functions/get-user-full-name.function.js.map +1 -0
- package/src/lib/functions/is-symbol.function.d.ts +1 -0
- package/src/lib/functions/is-symbol.function.js +8 -0
- package/src/lib/functions/is-symbol.function.js.map +1 -0
- package/src/lib/functions/is-valid-date.function.d.ts +1 -0
- package/src/lib/functions/is-valid-date.function.js +5 -0
- package/src/lib/functions/is-valid-date.function.js.map +1 -0
- package/src/lib/functions/kebab-case.function.d.ts +1 -0
- package/src/lib/functions/kebab-case.function.js +5 -0
- package/src/lib/functions/kebab-case.function.js.map +1 -0
- package/src/lib/functions/map-entities-to-options.function.d.ts +7 -0
- package/src/lib/functions/map-entities-to-options.function.js +7 -0
- package/src/lib/functions/map-entities-to-options.function.js.map +1 -0
- package/src/lib/functions/map-enum-to-array-of-values.function copy.d.ts +1 -0
- package/src/lib/functions/map-enum-to-array-of-values.function copy.js +4 -0
- package/src/lib/functions/map-enum-to-array-of-values.function copy.js.map +1 -0
- package/src/lib/functions/map-enum-to-array-of-values.function.d.ts +1 -0
- package/src/lib/functions/map-enum-to-array-of-values.function.js +4 -0
- package/src/lib/functions/map-enum-to-array-of-values.function.js.map +1 -0
- package/src/lib/functions/map-enum-to-lookup-array.function.d.ts +2 -0
- package/src/lib/functions/map-enum-to-lookup-array.function.js +5 -0
- package/src/lib/functions/map-enum-to-lookup-array.function.js.map +1 -0
- package/src/lib/functions/map-enum-to-options.function copy.d.ts +4 -0
- package/src/lib/functions/map-enum-to-options.function copy.js +7 -0
- package/src/lib/functions/map-enum-to-options.function copy.js.map +1 -0
- package/src/lib/functions/map-enum-to-options.function.d.ts +4 -0
- package/src/lib/functions/map-enum-to-options.function.js +7 -0
- package/src/lib/functions/map-enum-to-options.function.js.map +1 -0
- package/src/lib/functions/mock-calls.function.d.ts +3 -0
- package/src/lib/functions/mock-calls.function.js +6 -0
- package/src/lib/functions/mock-calls.function.js.map +1 -0
- package/src/lib/functions/money.function.d.ts +1 -0
- package/src/lib/functions/money.function.js +17 -0
- package/src/lib/functions/money.function.js.map +1 -0
- package/src/lib/functions/parse-bool.function.d.ts +1 -0
- package/src/lib/functions/parse-bool.function.js +4 -0
- package/src/lib/functions/parse-bool.function.js.map +1 -0
- package/src/lib/functions/properties-to-array.function.d.ts +1 -0
- package/src/lib/functions/properties-to-array.function.js +16 -0
- package/src/lib/functions/properties-to-array.function.js.map +1 -0
- package/src/lib/functions/remove-alpha-chars.function.d.ts +1 -0
- package/src/lib/functions/remove-alpha-chars.function.js +9 -0
- package/src/lib/functions/remove-alpha-chars.function.js.map +1 -0
- package/src/lib/functions/remove-element-at-index.function copy.d.ts +1 -0
- package/src/lib/functions/remove-element-at-index.function copy.js +10 -0
- package/src/lib/functions/remove-element-at-index.function copy.js.map +1 -0
- package/src/lib/functions/remove-element-at-index.function.d.ts +1 -0
- package/src/lib/functions/remove-element-at-index.function.js +10 -0
- package/src/lib/functions/remove-element-at-index.function.js.map +1 -0
- package/src/lib/functions/round.function copy.d.ts +1 -0
- package/src/lib/functions/round.function copy.js +5 -0
- package/src/lib/functions/round.function copy.js.map +1 -0
- package/src/lib/functions/round.function.d.ts +1 -0
- package/src/lib/functions/round.function.js +5 -0
- package/src/lib/functions/round.function.js.map +1 -0
- package/src/lib/functions/sanitize-filename.function.d.ts +1 -0
- package/src/lib/functions/sanitize-filename.function.js +8 -0
- package/src/lib/functions/sanitize-filename.function.js.map +1 -0
- package/src/lib/functions/sleep.function.d.ts +1 -0
- package/src/lib/functions/sleep.function.js +7 -0
- package/src/lib/functions/sleep.function.js.map +1 -0
- package/src/lib/functions/snake-case.function.d.ts +24 -0
- package/src/lib/functions/snake-case.function.js +29 -0
- package/src/lib/functions/snake-case.function.js.map +1 -0
- package/src/lib/functions/sort-by-created-at.function.d.ts +2 -0
- package/src/lib/functions/sort-by-created-at.function.js +5 -0
- package/src/lib/functions/sort-by-created-at.function.js.map +1 -0
- package/src/lib/functions/sort-by-full-name.function.d.ts +2 -0
- package/src/lib/functions/sort-by-full-name.function.js +5 -0
- package/src/lib/functions/sort-by-full-name.function.js.map +1 -0
- package/src/lib/functions/sort-by-id.function.d.ts +3 -0
- package/src/lib/functions/sort-by-id.function.js +5 -0
- package/src/lib/functions/sort-by-id.function.js.map +1 -0
- package/src/lib/functions/sort-by-name.function.d.ts +3 -0
- package/src/lib/functions/sort-by-name.function.js +5 -0
- package/src/lib/functions/sort-by-name.function.js.map +1 -0
- package/src/lib/functions/sort-numbers.function.d.ts +1 -0
- package/src/lib/functions/sort-numbers.function.js +4 -0
- package/src/lib/functions/sort-numbers.function.js.map +1 -0
- package/src/lib/functions/split-date-range-into-days.function.d.ts +4 -0
- package/src/lib/functions/split-date-range-into-days.function.js +19 -0
- package/src/lib/functions/split-date-range-into-days.function.js.map +1 -0
- package/src/lib/functions/subtract-offset.function.d.ts +1 -0
- package/src/lib/functions/subtract-offset.function.js +11 -0
- package/src/lib/functions/subtract-offset.function.js.map +1 -0
- package/src/lib/functions/to-boolean-string.function.d.ts +1 -0
- package/src/lib/functions/to-boolean-string.function.js +4 -0
- package/src/lib/functions/to-boolean-string.function.js.map +1 -0
- package/src/lib/functions/to-calendar-date.function.d.ts +1 -0
- package/src/lib/functions/to-calendar-date.function.js +9 -0
- package/src/lib/functions/to-calendar-date.function.js.map +1 -0
- package/src/lib/functions/to-csv-string.function.d.ts +1 -0
- package/src/lib/functions/to-csv-string.function.js +4 -0
- package/src/lib/functions/to-csv-string.function.js.map +1 -0
- package/src/lib/functions/to-decimal-base.function.d.ts +1 -0
- package/src/lib/functions/to-decimal-base.function.js +19 -0
- package/src/lib/functions/to-decimal-base.function.js.map +1 -0
- package/src/lib/functions/to-dollars-and-cents.function.d.ts +1 -0
- package/src/lib/functions/to-dollars-and-cents.function.js +14 -0
- package/src/lib/functions/to-dollars-and-cents.function.js.map +1 -0
- package/src/lib/functions/to-string.function.d.ts +1 -0
- package/src/lib/functions/to-string.function.js +23 -0
- package/src/lib/functions/to-string.function.js.map +1 -0
- package/src/lib/functions/to-unique-array.function.d.ts +1 -0
- package/src/lib/functions/to-unique-array.function.js +4 -0
- package/src/lib/functions/to-unique-array.function.js.map +1 -0
- package/src/lib/functions/to-words.function.d.ts +1 -0
- package/src/lib/functions/to-words.function.js +89 -0
- package/src/lib/functions/to-words.function.js.map +1 -0
- package/src/lib/functions/try-json-parse.d.ts +1 -0
- package/src/lib/functions/try-json-parse.js +12 -0
- package/src/lib/functions/try-json-parse.js.map +1 -0
- package/src/lib/functions/try-json-stringify.d.ts +1 -0
- package/src/lib/functions/try-json-stringify.js +12 -0
- package/src/lib/functions/try-json-stringify.js.map +1 -0
- package/src/lib/functions/try-parse-date.function.d.ts +1 -0
- package/src/lib/functions/try-parse-date.function.js +14 -0
- package/src/lib/functions/try-parse-date.function.js.map +1 -0
- package/src/lib/functions/unicode-words.const.d.ts +8 -0
- package/src/lib/functions/unicode-words.const.js +66 -0
- package/src/lib/functions/unicode-words.const.js.map +1 -0
- package/src/lib/functions/upper-first.function.d.ts +1 -0
- package/src/lib/functions/upper-first.function.js +10 -0
- package/src/lib/functions/upper-first.function.js.map +1 -0
- package/src/lib/functions/use-date.function.d.ts +1 -0
- package/src/lib/functions/use-date.function.js +19 -0
- package/src/lib/functions/use-date.function.js.map +1 -0
- package/src/lib/functions/words.function.d.ts +17 -0
- package/src/lib/functions/words.function.js +32 -0
- package/src/lib/functions/words.function.js.map +1 -0
- package/src/lib/types/access-token.interface.d.ts +8 -0
- package/src/lib/types/access-token.interface.js +2 -0
- package/src/lib/types/access-token.interface.js.map +1 -0
- package/src/lib/types/axios-wrapped-nest-exception.interface.d.ts +5 -0
- package/src/lib/types/axios-wrapped-nest-exception.interface.js +2 -0
- package/src/lib/types/axios-wrapped-nest-exception.interface.js.map +1 -0
- package/src/lib/types/company.type.d.ts +18 -0
- package/src/lib/types/company.type.js +2 -0
- package/src/lib/types/company.type.js.map +1 -0
- package/src/lib/types/createable.type.d.ts +3 -0
- package/src/lib/types/createable.type.js +2 -0
- package/src/lib/types/createable.type.js.map +1 -0
- package/src/lib/types/entity-provider.interface.d.ts +9 -0
- package/src/lib/types/entity-provider.interface.js +2 -0
- package/src/lib/types/entity-provider.interface.js.map +1 -0
- package/src/lib/types/keys-of.type copy.d.ts +3 -0
- package/src/lib/types/keys-of.type copy.js +2 -0
- package/src/lib/types/keys-of.type copy.js.map +1 -0
- package/src/lib/types/keys-of.type.d.ts +3 -0
- package/src/lib/types/keys-of.type.js +2 -0
- package/src/lib/types/keys-of.type.js.map +1 -0
- package/src/lib/types/lookup.interface copy.d.ts +4 -0
- package/src/lib/types/lookup.interface copy.js +2 -0
- package/src/lib/types/lookup.interface copy.js.map +1 -0
- package/src/lib/types/lookup.interface.d.ts +4 -0
- package/src/lib/types/lookup.interface.js +2 -0
- package/src/lib/types/lookup.interface.js.map +1 -0
- package/src/lib/types/nameable.type.d.ts +4 -0
- package/src/lib/types/nameable.type.js +2 -0
- package/src/lib/types/nameable.type.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onivoro/isomorphic-common",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.19.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
|
-
"main": "./index.js",
|
|
6
|
-
"types": "./index.d.ts",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/onivoro/monorepo.git"
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
"**/*.js.map",
|
|
18
18
|
"README.md"
|
|
19
19
|
]
|
|
20
|
-
}
|
|
20
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export * from './lib/constants/api-id-header.constant';
|
|
2
|
+
export * from './lib/constants/api-key-header.constant';
|
|
3
|
+
export * from './lib/constants/auth-cookie-name.constant';
|
|
4
|
+
export * from './lib/constants/regexes.constant';
|
|
5
|
+
export * from './lib/functions/arrange-act-assert.function';
|
|
6
|
+
export * from './lib/functions/mock-calls.function';
|
|
7
|
+
export * from './lib/functions/chunk.function';
|
|
8
|
+
export * from './lib/functions/format-usd.function';
|
|
9
|
+
export * from './lib/functions/get-date-last-month.function';
|
|
10
|
+
export * from './lib/functions/get-date-range-for-month.function';
|
|
11
|
+
export * from './lib/functions/get-user-full-name.function';
|
|
12
|
+
export * from './lib/functions/is-valid-date.function';
|
|
13
|
+
export * from './lib/functions/map-entities-to-options.function';
|
|
14
|
+
export * from './lib/functions/map-enum-to-array-of-values.function';
|
|
15
|
+
export * from './lib/functions/map-enum-to-lookup-array.function';
|
|
16
|
+
export * from './lib/functions/map-enum-to-options.function';
|
|
17
|
+
export * from './lib/functions/remove-element-at-index.function';
|
|
18
|
+
export * from './lib/functions/round.function';
|
|
19
|
+
export * from './lib/functions/sort-by-created-at.function';
|
|
20
|
+
export * from './lib/functions/sort-by-full-name.function';
|
|
21
|
+
export * from './lib/functions/sort-by-id.function';
|
|
22
|
+
export * from './lib/functions/sort-by-name.function';
|
|
23
|
+
export * from './lib/functions/sort-numbers.function';
|
|
24
|
+
export * from './lib/functions/split-date-range-into-days.function';
|
|
25
|
+
export * from './lib/functions/use-date.function';
|
|
26
|
+
export * from './lib/types/access-token.interface';
|
|
27
|
+
export * from './lib/types/company.type';
|
|
28
|
+
export * from './lib/types/createable.type';
|
|
29
|
+
export * from './lib/types/keys-of.type';
|
|
30
|
+
export * from './lib/types/lookup.interface';
|
|
31
|
+
export * from './lib/types/nameable.type';
|
|
32
|
+
export * from './lib/constants/millis-per-day.constant';
|
|
33
|
+
export * from './lib/constants/millis-per-hour.constant';
|
|
34
|
+
export * from './lib/constants/millis-per-minute.constant';
|
|
35
|
+
export * from './lib/constants/regexes.constant';
|
|
36
|
+
export * from './lib/functions/add-offset.function';
|
|
37
|
+
export * from './lib/functions/camel-case.function';
|
|
38
|
+
export * from './lib/functions/convert-object-to-literal.function';
|
|
39
|
+
export * from './lib/functions/format-usd.function';
|
|
40
|
+
export * from './lib/functions/from-boolean-string.function';
|
|
41
|
+
export * from './lib/functions/from-calendar-date.function';
|
|
42
|
+
export * from './lib/functions/from-csv-string.function';
|
|
43
|
+
export * from './lib/functions/get-date-range-for-month.function';
|
|
44
|
+
export * from './lib/functions/is-symbol.function';
|
|
45
|
+
export * from './lib/functions/is-valid-date.function';
|
|
46
|
+
export * from './lib/functions/kebab-case.function';
|
|
47
|
+
export * from './lib/functions/map-enum-to-array-of-values.function';
|
|
48
|
+
export * from './lib/functions/map-enum-to-lookup-array.function';
|
|
49
|
+
export * from './lib/functions/map-enum-to-options.function';
|
|
50
|
+
export * from './lib/functions/money.function';
|
|
51
|
+
export * from './lib/functions/parse-bool.function';
|
|
52
|
+
export * from './lib/functions/properties-to-array.function';
|
|
53
|
+
export * from './lib/functions/remove-alpha-chars.function';
|
|
54
|
+
export * from './lib/functions/remove-element-at-index.function';
|
|
55
|
+
export * from './lib/functions/round.function';
|
|
56
|
+
export * from './lib/functions/sleep.function';
|
|
57
|
+
export * from './lib/functions/sanitize-filename.function';
|
|
58
|
+
export * from './lib/functions/snake-case.function';
|
|
59
|
+
export * from './lib/functions/subtract-offset.function';
|
|
60
|
+
export * from './lib/functions/to-boolean-string.function';
|
|
61
|
+
export * from './lib/functions/to-calendar-date.function';
|
|
62
|
+
export * from './lib/functions/to-csv-string.function';
|
|
63
|
+
export * from './lib/functions/to-decimal-base.function';
|
|
64
|
+
export * from './lib/functions/to-dollars-and-cents.function';
|
|
65
|
+
export * from './lib/functions/to-unique-array.function';
|
|
66
|
+
export * from './lib/functions/to-words.function';
|
|
67
|
+
export * from './lib/functions/try-parse-date.function';
|
|
68
|
+
export * from './lib/functions/unicode-words.const';
|
|
69
|
+
export * from './lib/functions/upper-first.function';
|
|
70
|
+
export * from './lib/functions/words.function';
|
|
71
|
+
export * from './lib/types/axios-wrapped-nest-exception.interface';
|
|
72
|
+
export * from './lib/types/entity-provider.interface';
|
|
73
|
+
export * from './lib/types/keys-of.type';
|
|
74
|
+
export * from './lib/types/lookup.interface';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export * from './lib/constants/api-id-header.constant';
|
|
2
|
+
export * from './lib/constants/api-key-header.constant';
|
|
3
|
+
export * from './lib/constants/auth-cookie-name.constant';
|
|
4
|
+
export * from './lib/constants/regexes.constant';
|
|
5
|
+
export * from './lib/functions/arrange-act-assert.function';
|
|
6
|
+
export * from './lib/functions/mock-calls.function';
|
|
7
|
+
export * from './lib/functions/chunk.function';
|
|
8
|
+
export * from './lib/functions/format-usd.function';
|
|
9
|
+
export * from './lib/functions/get-date-last-month.function';
|
|
10
|
+
export * from './lib/functions/get-date-range-for-month.function';
|
|
11
|
+
export * from './lib/functions/get-user-full-name.function';
|
|
12
|
+
export * from './lib/functions/is-valid-date.function';
|
|
13
|
+
export * from './lib/functions/map-entities-to-options.function';
|
|
14
|
+
export * from './lib/functions/map-enum-to-array-of-values.function';
|
|
15
|
+
export * from './lib/functions/map-enum-to-lookup-array.function';
|
|
16
|
+
export * from './lib/functions/map-enum-to-options.function';
|
|
17
|
+
export * from './lib/functions/remove-element-at-index.function';
|
|
18
|
+
export * from './lib/functions/round.function';
|
|
19
|
+
export * from './lib/functions/sort-by-created-at.function';
|
|
20
|
+
export * from './lib/functions/sort-by-full-name.function';
|
|
21
|
+
export * from './lib/functions/sort-by-id.function';
|
|
22
|
+
export * from './lib/functions/sort-by-name.function';
|
|
23
|
+
export * from './lib/functions/sort-numbers.function';
|
|
24
|
+
export * from './lib/functions/split-date-range-into-days.function';
|
|
25
|
+
export * from './lib/functions/use-date.function';
|
|
26
|
+
export * from './lib/types/access-token.interface';
|
|
27
|
+
export * from './lib/types/company.type';
|
|
28
|
+
export * from './lib/types/createable.type';
|
|
29
|
+
export * from './lib/types/keys-of.type';
|
|
30
|
+
export * from './lib/types/lookup.interface';
|
|
31
|
+
export * from './lib/types/nameable.type';
|
|
32
|
+
export * from './lib/constants/millis-per-day.constant';
|
|
33
|
+
export * from './lib/constants/millis-per-hour.constant';
|
|
34
|
+
export * from './lib/constants/millis-per-minute.constant';
|
|
35
|
+
export * from './lib/constants/regexes.constant';
|
|
36
|
+
export * from './lib/functions/add-offset.function';
|
|
37
|
+
export * from './lib/functions/camel-case.function';
|
|
38
|
+
export * from './lib/functions/convert-object-to-literal.function';
|
|
39
|
+
export * from './lib/functions/format-usd.function';
|
|
40
|
+
export * from './lib/functions/from-boolean-string.function';
|
|
41
|
+
export * from './lib/functions/from-calendar-date.function';
|
|
42
|
+
export * from './lib/functions/from-csv-string.function';
|
|
43
|
+
export * from './lib/functions/get-date-range-for-month.function';
|
|
44
|
+
export * from './lib/functions/is-symbol.function';
|
|
45
|
+
export * from './lib/functions/is-valid-date.function';
|
|
46
|
+
export * from './lib/functions/kebab-case.function';
|
|
47
|
+
export * from './lib/functions/map-enum-to-array-of-values.function';
|
|
48
|
+
export * from './lib/functions/map-enum-to-lookup-array.function';
|
|
49
|
+
export * from './lib/functions/map-enum-to-options.function';
|
|
50
|
+
export * from './lib/functions/money.function';
|
|
51
|
+
export * from './lib/functions/parse-bool.function';
|
|
52
|
+
export * from './lib/functions/properties-to-array.function';
|
|
53
|
+
export * from './lib/functions/remove-alpha-chars.function';
|
|
54
|
+
export * from './lib/functions/remove-element-at-index.function';
|
|
55
|
+
export * from './lib/functions/round.function';
|
|
56
|
+
export * from './lib/functions/sleep.function';
|
|
57
|
+
export * from './lib/functions/sanitize-filename.function';
|
|
58
|
+
export * from './lib/functions/snake-case.function';
|
|
59
|
+
export * from './lib/functions/subtract-offset.function';
|
|
60
|
+
export * from './lib/functions/to-boolean-string.function';
|
|
61
|
+
export * from './lib/functions/to-calendar-date.function';
|
|
62
|
+
export * from './lib/functions/to-csv-string.function';
|
|
63
|
+
export * from './lib/functions/to-decimal-base.function';
|
|
64
|
+
export * from './lib/functions/to-dollars-and-cents.function';
|
|
65
|
+
export * from './lib/functions/to-unique-array.function';
|
|
66
|
+
export * from './lib/functions/to-words.function';
|
|
67
|
+
export * from './lib/functions/try-parse-date.function';
|
|
68
|
+
export * from './lib/functions/unicode-words.const';
|
|
69
|
+
export * from './lib/functions/upper-first.function';
|
|
70
|
+
export * from './lib/functions/words.function';
|
|
71
|
+
export * from './lib/types/axios-wrapped-nest-exception.interface';
|
|
72
|
+
export * from './lib/types/entity-provider.interface';
|
|
73
|
+
export * from './lib/types/keys-of.type';
|
|
74
|
+
export * from './lib/types/lookup.interface';
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/isomorphic/common/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qDAAqD,CAAC;AACpE,cAAc,mCAAmC,CAAC;AAElD,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAE1C,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,kCAAkC,CAAC;AAEjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qCAAqC,CAAC;AACpD,cAAc,oDAAoD,CAAC;AACnE,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,mDAAmD,CAAC;AAClE,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sDAAsD,CAAC;AACrE,cAAc,mDAAmD,CAAC;AAClE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kDAAkD,CAAC;AACjE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAE/C,cAAc,oDAAoD,CAAC;AACnE,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const apiIdHeader = "x-api-id";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-id-header.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/api-id-header.constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const apiKeyHeader = "x-api-key";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-key-header.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/api-key-header.constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const authCookieName = "token";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-cookie-name.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/auth-cookie-name.constant.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MILLIS_PER_DAY: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"millis-per-day.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/millis-per-day.constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG,eAAe,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MILLIS_PER_HOUR: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"millis-per-hour.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/millis-per-hour.constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MILLIS_PER_MINUTE: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"millis-per-minute.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/millis-per-minute.constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const oneOrMoreSpaces: RegExp;
|
|
2
|
+
export declare const multipleSpaces: RegExp;
|
|
3
|
+
export declare const comma: RegExp;
|
|
4
|
+
export declare const dashesLettersNumbers: RegExp;
|
|
5
|
+
export declare const dashesLettersNumbersSpaces: RegExp;
|
|
6
|
+
export declare const zip: RegExp;
|
|
7
|
+
export declare const phone: RegExp;
|
|
8
|
+
export declare const phonePlusOne: RegExp;
|
|
9
|
+
export declare const code: RegExp;
|
|
10
|
+
export declare const url: RegExp;
|
|
11
|
+
export declare const protocol: RegExp;
|
|
12
|
+
export declare const firstSpaceLast: RegExp;
|
|
13
|
+
export declare const passwordNumber: RegExp;
|
|
14
|
+
export declare const passwordUpper: RegExp;
|
|
15
|
+
export declare const passwordLower: RegExp;
|
|
16
|
+
export declare const passwordSpecial: RegExp;
|
|
17
|
+
export declare const ssn: RegExp;
|
|
18
|
+
export declare const numeric: RegExp;
|
|
19
|
+
export declare const duns: RegExp;
|
|
20
|
+
export declare const lastFourSocial: RegExp;
|
|
21
|
+
export declare const ein: RegExp;
|
|
22
|
+
export declare const stateShort: RegExp;
|
|
23
|
+
export declare const email: RegExp;
|
|
24
|
+
export declare const domain: RegExp;
|
|
25
|
+
export declare const emailDomain: RegExp;
|
|
26
|
+
export declare const v4: RegExp;
|
|
27
|
+
export declare const dateIso8601: RegExp;
|
|
28
|
+
export declare const dateIso8601WithTime: RegExp;
|
|
29
|
+
export declare const decimalRegex: RegExp;
|
|
30
|
+
export declare const slashR: RegExp;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const oneOrMoreSpaces = /\s{1,}/g;
|
|
2
|
+
export const multipleSpaces = /\s{2,}/g;
|
|
3
|
+
export const comma = /,/g;
|
|
4
|
+
export const dashesLettersNumbers = /^([a-z]|-|\d)*$/i;
|
|
5
|
+
export const dashesLettersNumbersSpaces = /^([a-z]|-|\s|\d)*$/i;
|
|
6
|
+
export const zip = /^\d{5}$/;
|
|
7
|
+
export const phone = /^\d{3}-\d{3}-\d{4}$/;
|
|
8
|
+
export const phonePlusOne = /^\+1\d{10}$/;
|
|
9
|
+
export const code = /^\d{6}$/;
|
|
10
|
+
export const url = /(https?:\/\/|https?:\/\/).*\..+/;
|
|
11
|
+
export const protocol = /https?:\/\/|https?:\/\//;
|
|
12
|
+
export const firstSpaceLast = /[a-z]+\s[a-z]+([a-z]|')+[a-z]+/i;
|
|
13
|
+
export const passwordNumber = /\d/;
|
|
14
|
+
export const passwordUpper = /[A-Z]/;
|
|
15
|
+
export const passwordLower = /[a-z]/;
|
|
16
|
+
export const passwordSpecial = /\^|\$|\*|\.|\?|-|!|@|#|%|>|<|:|;|_|~|\+|=/;
|
|
17
|
+
export const ssn = /^\d{3}-\d{2}-\d{4}$/;
|
|
18
|
+
export const numeric = /^(\d|\.)*$/;
|
|
19
|
+
export const duns = /^\d{9}$/;
|
|
20
|
+
export const lastFourSocial = /^\d{4}$/;
|
|
21
|
+
export const ein = /^\d{2}-\d{7}$/;
|
|
22
|
+
export const stateShort = /^[A-Z]{2}$/;
|
|
23
|
+
export const email = /^(([^<>()[\]\\.,;:\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,}))$/;
|
|
24
|
+
export const domain = /^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.)+[a-zA-Z]{2,63}$/;
|
|
25
|
+
export const emailDomain = /^[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
26
|
+
export const v4 = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/;
|
|
27
|
+
export const dateIso8601 = /^\d{4}-\d{1,2}-\d{1,2}$/;
|
|
28
|
+
export const dateIso8601WithTime = /^\d{4}-\d{1,2}-\d{1,2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
29
|
+
export const decimalRegex = /(\d|\.)/g;
|
|
30
|
+
export const slashR = /\r/g;
|
|
31
|
+
//# sourceMappingURL=regexes.constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regexes.constant.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/constants/regexes.constant.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,SAAS,CAAC;AACzC,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AACxC,MAAM,CAAC,MAAM,KAAK,GAAG,IAAI,CAAC;AAC1B,MAAM,CAAC,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AACvD,MAAM,CAAC,MAAM,0BAA0B,GAAG,qBAAqB,CAAC;AAChE,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC;AAC7B,MAAM,CAAC,MAAM,KAAK,GAAG,qBAAqB,CAAC;AAC3C,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,GAAG,GAAG,iCAAiC,CAAC;AACrD,MAAM,CAAC,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AACnC,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,OAAO,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,2CAA2C,CAAC;AAC3E,MAAM,CAAC,MAAM,GAAG,GAAG,qBAAqB,CAAC;AACzC,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC;AACpC,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC;AACxC,MAAM,CAAC,MAAM,GAAG,GAAG,eAAe,CAAC;AACnC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,KAAK,GAAG,uJAAuJ,CAAC;AAC7K,MAAM,CAAC,MAAM,MAAM,GAAG,mDAAmD,CAAC;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAG,gCAAgC,CAAC;AAC5D,MAAM,CAAC,MAAM,EAAE,GAAG,wFAAwF,CAAC;AAC3G,MAAM,CAAC,MAAM,WAAW,GAAG,yBAAyB,CAAC;AACrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,mDAAmD,CAAC;AACvF,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AACvC,MAAM,CAAC,MAAM,MAAM,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function addOffset(input: string | Date | undefined | null): Date | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MILLIS_PER_MINUTE } from '../constants/millis-per-minute.constant';
|
|
2
|
+
import { tryParseDate } from './try-parse-date.function';
|
|
3
|
+
export function addOffset(input) {
|
|
4
|
+
const parsed = tryParseDate(input);
|
|
5
|
+
if (!parsed) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const offset = (parsed).getTimezoneOffset();
|
|
9
|
+
return new Date(parsed.valueOf() + offset * MILLIS_PER_MINUTE);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=add-offset.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-offset.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/add-offset.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,MAAM,UAAU,SAAS,CAAC,KAAuC;IAC7D,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAEnC,IAAG,CAAC,MAAM,EAAE,CAAC;QACT,OAAO;IACX,CAAC;IAED,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAE5C,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,GAAG,iBAAiB,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// YOU MUST AWAIT THIS FUNCTION WHEN INVOKING IT!!!
|
|
2
|
+
import { __awaiter } from "tslib";
|
|
3
|
+
// TODO: PUT THIS IN A TEST-ONLY LIBRARY => LIBS/ISO/JEST
|
|
4
|
+
export function arrangeActAssert(_a) {
|
|
5
|
+
return __awaiter(this, arguments, void 0, function* ({ arrange, act, assert }) {
|
|
6
|
+
const arrangeOutput = arrange();
|
|
7
|
+
const actInput = isPromise(arrangeOutput) ? yield arrangeOutput : arrangeOutput;
|
|
8
|
+
const actOutput = act(actInput);
|
|
9
|
+
const assertInput = isPromise(actOutput) ? yield actOutput : actOutput;
|
|
10
|
+
const assertOutput = assert(Object.assign(Object.assign({}, actInput), { result: assertInput }));
|
|
11
|
+
const returnValue = isPromise(assertOutput) ? yield assertOutput : assertOutput;
|
|
12
|
+
return returnValue;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function isPromise(value) {
|
|
16
|
+
return (typeof (value === null || value === void 0 ? void 0 : value.then)) === 'function';
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=arrange-act-assert.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrange-act-assert.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/arrange-act-assert.function.ts"],"names":[],"mappings":"AAAA,mDAAmD;;AAEnD,yDAAyD;AAEzD,MAAM,UAAgB,gBAAgB;yDAA6B,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAA0I;QAC/N,MAAM,aAAa,GAAG,OAAO,EAAE,CAAC;QAEhC,MAAM,QAAQ,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;QAEhF,MAAM,SAAS,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;QAEhC,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAEvE,MAAM,YAAY,GAAG,MAAM,iCAAM,QAAQ,KAAE,MAAM,EAAE,WAAW,IAAG,CAAC;QAElE,MAAM,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC;QAEhF,OAAO,WAAW,CAAC;IACvB,CAAC;CAAA;AAED,SAAS,SAAS,CAAC,KAAU;IACzB,OAAO,CAAC,OAAO,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,CAAC,KAAK,UAAU,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
3
|
+
*
|
|
4
|
+
* @since 3.0.0
|
|
5
|
+
* @category String
|
|
6
|
+
* @param {string} [string=''] The string to convert.
|
|
7
|
+
* @returns {string} Returns the camel cased string.
|
|
8
|
+
* @see lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* camelCase('Foo Bar')
|
|
12
|
+
* // => 'fooBar'
|
|
13
|
+
*
|
|
14
|
+
* camelCase('--foo-bar--')
|
|
15
|
+
* // => 'fooBar'
|
|
16
|
+
*
|
|
17
|
+
* camelCase('__FOO_BAR__')
|
|
18
|
+
* // => 'fooBar'
|
|
19
|
+
*/
|
|
20
|
+
export declare const camelCase: (string: string) => string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// https://github.com/lodash/lodash/blob/main/src/camelCase.ts
|
|
2
|
+
import { toString } from './to-string.function';
|
|
3
|
+
import { upperFirst } from './upper-first.function';
|
|
4
|
+
import { words } from './words.function';
|
|
5
|
+
/**
|
|
6
|
+
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
|
|
7
|
+
*
|
|
8
|
+
* @since 3.0.0
|
|
9
|
+
* @category String
|
|
10
|
+
* @param {string} [string=''] The string to convert.
|
|
11
|
+
* @returns {string} Returns the camel cased string.
|
|
12
|
+
* @see lowerCase, kebabCase, snakeCase, startCase, upperCase, upperFirst
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* camelCase('Foo Bar')
|
|
16
|
+
* // => 'fooBar'
|
|
17
|
+
*
|
|
18
|
+
* camelCase('--foo-bar--')
|
|
19
|
+
* // => 'fooBar'
|
|
20
|
+
*
|
|
21
|
+
* camelCase('__FOO_BAR__')
|
|
22
|
+
* // => 'fooBar'
|
|
23
|
+
*/
|
|
24
|
+
export const camelCase = (string) => words(toString(string).replace(/['\u2019]/g, '')).reduce((result, word, index) => {
|
|
25
|
+
word = word.toLowerCase();
|
|
26
|
+
return result + (index ? upperFirst(word) : word);
|
|
27
|
+
}, '');
|
|
28
|
+
//# sourceMappingURL=camel-case.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camel-case.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/camel-case.function.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAc,EAAU,EAAE,CAC/C,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAc,CAAC,MAAM,CAAC,CAAC,MAAc,EAAE,IAAY,EAAE,KAAa,EAAE,EAAE;IACnH,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC1B,OAAO,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC,EAAE,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function chunk<T>(array: T[], numDivisions: number): T[][];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function chunk(array, numDivisions) {
|
|
2
|
+
if (numDivisions <= 0) {
|
|
3
|
+
throw new Error('Number of divisions must be greater than or equal to 0');
|
|
4
|
+
}
|
|
5
|
+
if (array.length === 0) {
|
|
6
|
+
return [];
|
|
7
|
+
}
|
|
8
|
+
const result = [];
|
|
9
|
+
const chunkSize = Math.ceil(array.length / numDivisions);
|
|
10
|
+
for (let i = 0; i < array.length; i += chunkSize) {
|
|
11
|
+
result.push(array.slice(i, i + chunkSize));
|
|
12
|
+
}
|
|
13
|
+
while (result.length > numDivisions) {
|
|
14
|
+
const lastChunk = result.pop();
|
|
15
|
+
if (lastChunk) {
|
|
16
|
+
result[result.length - 1].push(...lastChunk);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return result;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=chunk.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/chunk.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAI,KAAU,EAAE,YAAoB;IACrD,IAAI,YAAY,IAAI,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,MAAM,GAAU,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,YAAY,CAAC,CAAC;IAEzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,SAAS,EAAE,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAC/C,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,GAAG,YAAY,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;QAC/B,IAAI,SAAS,EAAE,CAAC;YACZ,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;QACjD,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function convertObjectToLiteral(literalFn: (k: string, v: any) => string, delimiter: string, keyValuePairs: Record<string, any>): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function convertObjectToLiteral(literalFn, delimiter, keyValuePairs) {
|
|
2
|
+
return Object.entries(keyValuePairs)
|
|
3
|
+
.filter(([, v]) => !!v || v === 0 || v === false)
|
|
4
|
+
.map(([k, v]) => { var _a; return literalFn(k, (_a = v === null || v === void 0 ? void 0 : v.toString) === null || _a === void 0 ? void 0 : _a.call(v)); })
|
|
5
|
+
.join(delimiter);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=convert-object-to-literal.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convert-object-to-literal.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/convert-object-to-literal.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,sBAAsB,CACpC,SAAwC,EACxC,SAAiB,EACjB,aAAkC;IAElC,OAAO,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;SAChD,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,SAAS,CAAC,CAAC,EAAE,MAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,QAAQ,iDAAI,CAAC,CAAA,EAAA,CAAC;SAC9C,IAAI,CAAC,SAAS,CAAC,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatUsd(rawAmount?: number | string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-usd.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/format-usd.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAC,SAA2B;IACjD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACtC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fromBooleanString(value?: string): value is "true";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-boolean-string.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/from-boolean-string.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,KAAK,KAAK,MAAM,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fromCalendarDate(input: string | Date | undefined | null): Date | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-calendar-date.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/from-calendar-date.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,UAAU,gBAAgB,CAAC,KAAuC;IACpE,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fromCsvString(value?: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-csv-string.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/from-csv-string.function.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDateLastMonth(): Date;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MILLIS_PER_DAY } from "../constants/millis-per-day.constant";
|
|
2
|
+
export function getDateLastMonth() {
|
|
3
|
+
const days = new Date().getUTCDate() + 1;
|
|
4
|
+
return new Date(Date.now() - (MILLIS_PER_DAY * days));
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=get-date-last-month.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-date-last-month.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/get-date-last-month.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,UAAU,gBAAgB;IAC5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACzC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MILLIS_PER_DAY } from "../constants/millis-per-day.constant";
|
|
2
|
+
export function getDateRangeForMonth(year, month) {
|
|
3
|
+
const startDate = new Date(+Date.UTC(year, month + -1, 0) + MILLIS_PER_DAY);
|
|
4
|
+
const endDate = new Date(+Date.UTC(year, month + 0, 0) + MILLIS_PER_DAY);
|
|
5
|
+
return { startDate, endDate };
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=get-date-range-for-month.function%20copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-date-range-for-month.function copy.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/get-date-range-for-month.function copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa;IAC5D,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IAEzE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MILLIS_PER_DAY } from "../constants/millis-per-day.constant";
|
|
2
|
+
export function getDateRangeForMonth(year, month) {
|
|
3
|
+
const startDate = new Date(+Date.UTC(year, month + -1, 0) + MILLIS_PER_DAY);
|
|
4
|
+
const endDate = new Date(+Date.UTC(year, month + 0, 0) + MILLIS_PER_DAY);
|
|
5
|
+
return { startDate, endDate };
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=get-date-range-for-month.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-date-range-for-month.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/get-date-range-for-month.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,KAAa;IAC5D,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IAC5E,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC;IAEzE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getTag(value: any): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// https://github.com/lodash/lodash/blob/main/src/.internal/getTag.ts
|
|
2
|
+
const toString = Object.prototype.toString;
|
|
3
|
+
export function getTag(value) {
|
|
4
|
+
if (value == null) {
|
|
5
|
+
return value === undefined ? '[object Undefined]' : '[object Null]';
|
|
6
|
+
}
|
|
7
|
+
return toString.call(value);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=get-tag.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-tag.function.js","sourceRoot":"","sources":["../../../../../../../libs/isomorphic/common/src/lib/functions/get-tag.function.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAErE,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAA;AAE1C,MAAM,UAAU,MAAM,CAAC,KAAU;IAC7B,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAChB,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,eAAe,CAAA;IACvE,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC/B,CAAC"}
|