1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.stringify = exports.isMap = exports.isSet = exports.isFunction = exports.isArray = exports.isObject = exports.isNull = exports.isUndefined = void 0;
|
19 | function isUndefined(val) {
|
20 | return Object.prototype.toString.call(val) === "[object Undefined]";
|
21 | }
|
22 | exports.isUndefined = isUndefined;
|
23 | function isNull(val) {
|
24 | return Object.prototype.toString.call(val) === "[object Null]";
|
25 | }
|
26 | exports.isNull = isNull;
|
27 | function isObject(val) {
|
28 | return Object.prototype.toString.call(val) === "[object Object]";
|
29 | }
|
30 | exports.isObject = isObject;
|
31 | function isArray(val) {
|
32 | return Object.prototype.toString.call(val) === "[object Array]";
|
33 | }
|
34 | exports.isArray = isArray;
|
35 |
|
36 | function isFunction(val) {
|
37 | return Object.prototype.toString.call(val) === "[object Function]";
|
38 | }
|
39 | exports.isFunction = isFunction;
|
40 | function isSet(val) {
|
41 | return Object.prototype.toString.call(val) === "[object Set]";
|
42 | }
|
43 | exports.isSet = isSet;
|
44 | function isMap(val) {
|
45 | return Object.prototype.toString.call(val) === "[object Map]";
|
46 | }
|
47 | exports.isMap = isMap;
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | function stringify(value) {
|
60 | if (!isUndefined(value) && !isNull(value)) {
|
61 | if (isFunction(value === null || value === void 0 ? void 0 : value.toString)) {
|
62 | value = value.toString();
|
63 | }
|
64 | }
|
65 | return String(value);
|
66 | }
|
67 | exports.stringify = stringify;
|