@provis/provis-common-be-module 2.3.16 → 2.3.17
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/dist/class/main.repository.js +4 -4
- package/dist/constants/claim/kalog.js +1 -1
- package/dist/constants/claim/loket.js +27 -27
- package/dist/constants/claim/motorVehicle.js +1 -1
- package/dist/constants/claim/travel.js +1 -1
- package/dist/constants/product/mv/mv.d.ts +8 -0
- package/dist/constants/product/mv/mv.js +16 -0
- package/dist/constants/product/mv.js +9 -2
- package/dist/constants/product.js +12 -12
- package/dist/constants/report.d.ts +0 -1
- package/dist/constants/report.js +10 -22
- package/dist/helpers/amountDescription.js +1 -1
- package/dist/helpers/axiosGet.js +1 -1
- package/dist/helpers/axiosPost.js +1 -1
- package/dist/helpers/axiosPut.js +1 -1
- package/dist/helpers/calculateByType.js +1 -1
- package/dist/helpers/calculateForNullable.js +5 -4
- package/dist/helpers/loop.js +2 -2
- package/dist/helpers/loopBackward.js +2 -2
- package/dist/helpers/readExcel.d.ts +2 -0
- package/package.json +1 -1
|
@@ -116,8 +116,8 @@ class MainRepository extends typeorm_1.Repository {
|
|
|
116
116
|
return result;
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
|
-
summaryField(
|
|
120
|
-
return __awaiter(this,
|
|
119
|
+
summaryField({ fieldToSum, search, additionalSearchOr, relations, }) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
121
|
let query = this.createQueryBuilder()
|
|
122
122
|
.select([
|
|
123
123
|
'COUNT(1) AS totalRows',
|
|
@@ -132,8 +132,8 @@ class MainRepository extends typeorm_1.Repository {
|
|
|
132
132
|
return query.getRawOne();
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
findAllAndCount(
|
|
136
|
-
return __awaiter(this,
|
|
135
|
+
findAllAndCount({ search, additionalSearchOr, relations, sortBy, offset = 1, maxCount = 50, }) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
const skipItems = ((offset < 1 ? 1 : offset) - 1) * maxCount;
|
|
138
138
|
let query = this.createQueryBuilder().select(this.selectFieldOnFindAllAndCount());
|
|
139
139
|
query = this.applySearchConditions({
|
|
@@ -3,37 +3,37 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const status_1 = require("./status");
|
|
4
4
|
const loket = {
|
|
5
5
|
// LIST RESIKO
|
|
6
|
-
RISK_CLK001: 'CLK001',
|
|
7
|
-
RISK_CLK002: 'CLK002',
|
|
8
|
-
RISK_CLK003: 'CLK003',
|
|
9
|
-
RISK_CLK004: 'CLK004',
|
|
10
|
-
RISK_CLK005: 'CLK005',
|
|
11
|
-
RISK_CLK006: 'CLK006',
|
|
12
|
-
RISK_CLK007: 'CLK007',
|
|
6
|
+
RISK_CLK001: 'CLK001',
|
|
7
|
+
RISK_CLK002: 'CLK002',
|
|
8
|
+
RISK_CLK003: 'CLK003',
|
|
9
|
+
RISK_CLK004: 'CLK004',
|
|
10
|
+
RISK_CLK005: 'CLK005',
|
|
11
|
+
RISK_CLK006: 'CLK006',
|
|
12
|
+
RISK_CLK007: 'CLK007',
|
|
13
13
|
// LIST DOCUMENT
|
|
14
|
-
DOCUMENT_DLK001: 'DLK001',
|
|
15
|
-
DOCUMENT_DLK002: 'DLK002',
|
|
16
|
-
DOCUMENT_DLK003: 'DLK003',
|
|
17
|
-
DOCUMENT_DLK004: 'DLK004',
|
|
18
|
-
DOCUMENT_DLK005: 'DLK005',
|
|
19
|
-
DOCUMENT_DLK006: 'DLK006',
|
|
20
|
-
DOCUMENT_DLK007: 'DLK007',
|
|
21
|
-
DOCUMENT_DLK008: 'DLK008',
|
|
22
|
-
DOCUMENT_DLK009: 'DLK009',
|
|
23
|
-
DOCUMENT_DLK010: 'DLK010',
|
|
24
|
-
DOCUMENT_DLK011: 'DLK011',
|
|
25
|
-
DOCUMENT_DLK012: 'DLK012',
|
|
26
|
-
DOCUMENT_DLK013: 'DLK013',
|
|
27
|
-
DOCUMENT_DLK014: 'DLK014',
|
|
28
|
-
DOCUMENT_DLK015: 'DLK015',
|
|
29
|
-
DOCUMENT_DLK016: 'DLK016',
|
|
30
|
-
DOCUMENT_DLK017: 'DLK017',
|
|
31
|
-
DOCUMENT_DLK018: 'DLK018',
|
|
32
|
-
DOCUMENT_DLK019: 'DLK019',
|
|
14
|
+
DOCUMENT_DLK001: 'DLK001',
|
|
15
|
+
DOCUMENT_DLK002: 'DLK002',
|
|
16
|
+
DOCUMENT_DLK003: 'DLK003',
|
|
17
|
+
DOCUMENT_DLK004: 'DLK004',
|
|
18
|
+
DOCUMENT_DLK005: 'DLK005',
|
|
19
|
+
DOCUMENT_DLK006: 'DLK006',
|
|
20
|
+
DOCUMENT_DLK007: 'DLK007',
|
|
21
|
+
DOCUMENT_DLK008: 'DLK008',
|
|
22
|
+
DOCUMENT_DLK009: 'DLK009',
|
|
23
|
+
DOCUMENT_DLK010: 'DLK010',
|
|
24
|
+
DOCUMENT_DLK011: 'DLK011',
|
|
25
|
+
DOCUMENT_DLK012: 'DLK012',
|
|
26
|
+
DOCUMENT_DLK013: 'DLK013',
|
|
27
|
+
DOCUMENT_DLK014: 'DLK014',
|
|
28
|
+
DOCUMENT_DLK015: 'DLK015',
|
|
29
|
+
DOCUMENT_DLK016: 'DLK016',
|
|
30
|
+
DOCUMENT_DLK017: 'DLK017',
|
|
31
|
+
DOCUMENT_DLK018: 'DLK018',
|
|
32
|
+
DOCUMENT_DLK019: 'DLK019',
|
|
33
33
|
DOCUMENT_DT001: 'DT001',
|
|
34
34
|
DOCUMENT_DT002: 'DT002',
|
|
35
35
|
DOCUMENT_DT003: 'DT003',
|
|
36
|
-
LIST_RISK: [],
|
|
36
|
+
LIST_RISK: [],
|
|
37
37
|
RISK_CONFIG: {},
|
|
38
38
|
DOCUMENT_CONFIG: {},
|
|
39
39
|
STATUS_DEADLINE: {},
|
|
@@ -33,7 +33,7 @@ const motorVehicle = {
|
|
|
33
33
|
VCDOC022: { key: 'VCDOC022', descEn: '', desc: 'Kuitansi dari Rumah Sakit' },
|
|
34
34
|
VCDOC023: { key: 'VCDOC023', descEn: '', desc: 'Sertifikat Kematian - Untuk kematian Pihak Ketiga' },
|
|
35
35
|
VCDOC024: { key: 'VCDOC024', descEn: '', desc: 'Seluruh korespondensi dengan pihak ketiga yang mengalami luka/kematian' },
|
|
36
|
-
LIST_RISK: [],
|
|
36
|
+
LIST_RISK: [],
|
|
37
37
|
RISK_CONFIG: {},
|
|
38
38
|
DOCUMENT_CONFIG: {},
|
|
39
39
|
STATUS_DEADLINE: {},
|
|
@@ -73,7 +73,7 @@ const travel = {
|
|
|
73
73
|
TCDOC044: { key: 'TCDOC044', descEn: '', desc: 'Tanda terima bagasi (berisi jam & tanggal bagasi diterima)' },
|
|
74
74
|
TCDOC045: { key: 'TCDOC045', descEn: '', desc: 'Ticket & Boarding Pass' },
|
|
75
75
|
TCDOC046: { key: 'TCDOC046', descEn: '', desc: 'Visum et Repertum' },
|
|
76
|
-
LIST_RISK: [],
|
|
76
|
+
LIST_RISK: [],
|
|
77
77
|
RISK_CONFIG: {},
|
|
78
78
|
DOCUMENT_CONFIG: {},
|
|
79
79
|
STATUS_DEADLINE: {},
|
|
@@ -8,6 +8,14 @@ const insuranceType = [
|
|
|
8
8
|
id: "Komprehensif",
|
|
9
9
|
en: "Comprehensive",
|
|
10
10
|
},
|
|
11
|
+
converage: {
|
|
12
|
+
id: 'Menanggung Kerugian dan/atau kerusakan fisik pada kendaraan yang dipertanggungkan karena sebab yang tidak dikecualikan dalam ketentuan polis',
|
|
13
|
+
en: 'Covering Loss and/or physical damage to insured vehicle by cause not otherwise excluded in terms of the policy',
|
|
14
|
+
},
|
|
15
|
+
deductible: {
|
|
16
|
+
id: '',
|
|
17
|
+
en: 'Own Material Damage, theft, burglary: IDR 300.000 anyone occurrence and for anyone unit for partial loss, except for:\n- Act of God as per AAUI Definition (Earthquake, Volcanic Eruption and Tsunami & Typhoon, Windstorm, Flood, Landslide, Hail), Strike, Riot, Civil Commotion & Terrorism and Sabotage: 10% of adjusted losses minimum IDR500.000,- anyone occurrence and anyone unit\n- TPL, PA Driver, PA Passenger, Medical Expenses: NIL\n- Theft by Own Driver / Employee: 10% of claim amount any one claim or occurrence\n- Additional deductible for Electrical and Battery : 20% of TSI',
|
|
18
|
+
},
|
|
11
19
|
},
|
|
12
20
|
{
|
|
13
21
|
code: "total-loss",
|
|
@@ -15,6 +23,14 @@ const insuranceType = [
|
|
|
15
23
|
id: "Kerugian Total",
|
|
16
24
|
en: "Total Loss",
|
|
17
25
|
},
|
|
26
|
+
converage: {
|
|
27
|
+
id: 'Untuk membayar kerugian atau kerusakan apabila biaya kerugian atau kerusakan tersebut melebihi 75% dari nilai kendaraan pada saat kerugian terjadi karena sebab yang tidak dikecualikan dalam ketentuan polis',
|
|
28
|
+
en: 'To pay loss or damage when the cost of such loss or damage exceeds 75% of the value of the vehicle at the time of loss by cause not otherwise excluded in terms of the policy',
|
|
29
|
+
},
|
|
30
|
+
deductible: {
|
|
31
|
+
id: '',
|
|
32
|
+
en: 'Own Material Damage, Theft, Burglary and Total Loss: IDR 300.000 anyone occurrence and for anyone unit Except for:\n- Act of God as per AAUI Definition (Earthquake, VolcanicEruption and Tsunami & Typhoon, Windstorm, Flood,Landslide, Hail), Strike, Riot, Civil Commotion & Terrorism and Sabotage: 10% of adjusted losses minimum IDR500.000,- anyone occurrence and anyone unit\n- TPL, PA Driver, PA Passenger, Medical Expenses: NIL',
|
|
33
|
+
},
|
|
18
34
|
},
|
|
19
35
|
];
|
|
20
36
|
exports.insuranceType = insuranceType;
|
|
@@ -53,12 +53,19 @@ const vehicleTypeCode = [
|
|
|
53
53
|
{
|
|
54
54
|
code: "VT002",
|
|
55
55
|
desc: {
|
|
56
|
-
id: "Jenis Kendaraan
|
|
57
|
-
en: "Vehicle Types
|
|
56
|
+
id: "Jenis Kendaraan Truk dan Pickup",
|
|
57
|
+
en: "Vehicle Types Truck and Pickup",
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
code: "VT003",
|
|
62
|
+
desc: {
|
|
63
|
+
id: "Jenis Kendaraan Bus",
|
|
64
|
+
en: "Vehicle Types Bus",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
code: "VT004",
|
|
62
69
|
desc: {
|
|
63
70
|
id: "Jenis Kendaraan Roda 2 (dua)",
|
|
64
71
|
en: "Type of 2 (two) Wheeled Vehicle",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const occupation_1 = require("./product/occupation");
|
|
4
4
|
const product = {
|
|
5
|
-
LIST: {},
|
|
6
|
-
MANUAL_LIST: [],
|
|
5
|
+
LIST: {},
|
|
6
|
+
MANUAL_LIST: [],
|
|
7
7
|
CARGO_BY_SYSTEM_LIST: [],
|
|
8
8
|
PRODUCT_CODE_PROPERTY_ALL_RISK: 'polismall-property-allrisk',
|
|
9
9
|
PRODUCT_CODE_EARTHQUAKE: 'polismall-earthquake',
|
|
@@ -52,17 +52,17 @@ const product = {
|
|
|
52
52
|
PRODUCT_CODE_CARGO_BUNDLE: 'polismall-cargo-bundle',
|
|
53
53
|
PRODUCT_CODE_MERIMEN_CARGO: 'polismall-merimen-cargo',
|
|
54
54
|
PRODUCT_CODE_CARGO_TEMAS: 'polismall-cargo-temas',
|
|
55
|
-
PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment',
|
|
55
|
+
PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment',
|
|
56
56
|
// OTTO
|
|
57
|
-
PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness',
|
|
58
|
-
PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas',
|
|
59
|
-
PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack',
|
|
60
|
-
PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp',
|
|
61
|
-
PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln',
|
|
62
|
-
PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam',
|
|
63
|
-
PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb',
|
|
64
|
-
PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb',
|
|
65
|
-
PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk',
|
|
57
|
+
PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness',
|
|
58
|
+
PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas',
|
|
59
|
+
PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack',
|
|
60
|
+
PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp',
|
|
61
|
+
PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln',
|
|
62
|
+
PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam',
|
|
63
|
+
PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb',
|
|
64
|
+
PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb',
|
|
65
|
+
PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk',
|
|
66
66
|
// BDKI
|
|
67
67
|
PRODUCT_CODE_BDKI_MOTOR: 'polismall-bdki-motor',
|
|
68
68
|
PRODUCT_CODE_BDKI_RUMAH: 'polismall-bdki-rumah',
|
package/dist/constants/report.js
CHANGED
|
@@ -2,51 +2,39 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const report = {
|
|
4
4
|
INITIAL: {
|
|
5
|
-
// status initial -> setiap awal upload = initial
|
|
6
5
|
code: 0,
|
|
7
6
|
desc: {
|
|
8
|
-
en:
|
|
9
|
-
id:
|
|
7
|
+
en: 'Initial',
|
|
8
|
+
id: 'Initial',
|
|
10
9
|
},
|
|
11
10
|
},
|
|
12
11
|
SUCCESS: {
|
|
13
|
-
// excel report berhasil di baca
|
|
14
12
|
code: 100,
|
|
15
13
|
desc: {
|
|
16
|
-
en:
|
|
17
|
-
id:
|
|
14
|
+
en: 'Success',
|
|
15
|
+
id: 'Sukses',
|
|
18
16
|
},
|
|
19
17
|
},
|
|
20
18
|
SUBMIT: {
|
|
21
|
-
// excel berhasil ke submit
|
|
22
19
|
code: 200,
|
|
23
20
|
desc: {
|
|
24
|
-
en:
|
|
25
|
-
id:
|
|
21
|
+
en: 'Submit',
|
|
22
|
+
id: 'Berhasil',
|
|
26
23
|
},
|
|
27
24
|
},
|
|
28
25
|
CANCEL: {
|
|
29
|
-
// dibatalkan oleh pengguna
|
|
30
26
|
code: 300,
|
|
31
27
|
desc: {
|
|
32
|
-
en:
|
|
33
|
-
id:
|
|
28
|
+
en: 'Cancel',
|
|
29
|
+
id: 'batal',
|
|
34
30
|
},
|
|
35
31
|
},
|
|
36
32
|
FAILED: {
|
|
37
|
-
// sistem gagal baca excel
|
|
38
33
|
code: 310,
|
|
39
34
|
desc: {
|
|
40
|
-
en:
|
|
41
|
-
id:
|
|
35
|
+
en: 'Failed',
|
|
36
|
+
id: 'Gagal',
|
|
42
37
|
},
|
|
43
38
|
},
|
|
44
|
-
LIST_ACTIVE: [],
|
|
45
39
|
};
|
|
46
|
-
report.LIST_ACTIVE = [
|
|
47
|
-
report.INITIAL,
|
|
48
|
-
report.SUCCESS,
|
|
49
|
-
report.CANCEL,
|
|
50
|
-
report.FAILED,
|
|
51
|
-
];
|
|
52
40
|
exports.default = report;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = terbilang;
|
|
4
3
|
function terbilang(value) {
|
|
5
4
|
const satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan'];
|
|
6
5
|
const belasan = ['sepuluh', 'sebelas', 'dua belas', 'tiga belas', 'empat belas', 'lima belas', 'enam belas', 'tujuh belas', 'delapan belas', 'sembilan belas'];
|
|
@@ -42,3 +41,4 @@ function terbilang(value) {
|
|
|
42
41
|
// Menghilangkan spasi yang double
|
|
43
42
|
return result.replace(/\s+/g, ' ').trim();
|
|
44
43
|
}
|
|
44
|
+
exports.default = terbilang;
|
package/dist/helpers/axiosGet.js
CHANGED
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const generateRelationId_1 = require("./generateRelationId");
|
|
14
14
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
15
15
|
const constants_1 = require("../constants");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = ({ url, headers, params, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
return yield axios_1.default.get(url, {
|
|
18
18
|
params,
|
|
19
19
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const generateRelationId_1 = require("./generateRelationId");
|
|
14
14
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
15
15
|
const constants_1 = require("../constants");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = ({ url, headers, body, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
return yield axios_1.default.post(url, body, {
|
|
18
18
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
19
19
|
}).then((result) => __awaiter(void 0, void 0, void 0, function* () {
|
package/dist/helpers/axiosPut.js
CHANGED
|
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
|
|
|
13
13
|
const constants_1 = require("../constants");
|
|
14
14
|
const generateRelationId_1 = require("./generateRelationId");
|
|
15
15
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
16
|
-
exports.default = (
|
|
16
|
+
exports.default = ({ url, headers, body, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
return yield axios_1.default.put(url, body, {
|
|
18
18
|
headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
|
|
19
19
|
}).then((result) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = default_1;
|
|
4
3
|
const brokerage_1 = require("../constants/brokerage");
|
|
5
4
|
function default_1(request) {
|
|
6
5
|
try {
|
|
@@ -17,3 +16,4 @@ function default_1(request) {
|
|
|
17
16
|
return null;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
19
|
+
exports.default = default_1;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sum =
|
|
4
|
-
exports.minus = minus;
|
|
5
|
-
exports.multiple = multiple;
|
|
6
|
-
exports.divide = divide;
|
|
3
|
+
exports.divide = exports.multiple = exports.minus = exports.sum = void 0;
|
|
7
4
|
function sum(a, b) {
|
|
8
5
|
try {
|
|
9
6
|
if (a == null && b == null)
|
|
@@ -14,6 +11,7 @@ function sum(a, b) {
|
|
|
14
11
|
return null;
|
|
15
12
|
}
|
|
16
13
|
}
|
|
14
|
+
exports.sum = sum;
|
|
17
15
|
function minus(a, b) {
|
|
18
16
|
try {
|
|
19
17
|
if (a == null && b == null)
|
|
@@ -24,6 +22,7 @@ function minus(a, b) {
|
|
|
24
22
|
return null;
|
|
25
23
|
}
|
|
26
24
|
}
|
|
25
|
+
exports.minus = minus;
|
|
27
26
|
function multiple(a, b) {
|
|
28
27
|
try {
|
|
29
28
|
if (a == null && b == null)
|
|
@@ -34,6 +33,7 @@ function multiple(a, b) {
|
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
36
|
+
exports.multiple = multiple;
|
|
37
37
|
function divide(a, b) {
|
|
38
38
|
try {
|
|
39
39
|
if (a == null && b == null)
|
|
@@ -44,3 +44,4 @@ function divide(a, b) {
|
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
exports.divide = divide;
|
package/dist/helpers/loop.js
CHANGED
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
function loop(
|
|
13
|
-
return __awaiter(this,
|
|
12
|
+
function loop(list, callback, result = []) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
if (list && list.length > 0) {
|
|
15
15
|
const [head, ...tail] = list;
|
|
16
16
|
return loop(tail, callback, [yield callback(head), ...result]);
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
function loop(
|
|
13
|
-
return __awaiter(this,
|
|
12
|
+
function loop(list, callback, result = []) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
14
|
if (list && list.length > 0) {
|
|
15
15
|
const [head, ...tail] = list;
|
|
16
16
|
return loop(tail, callback, [...result, yield callback(head)]);
|