12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.stringify = exports.isMap = exports.isSet = exports.isFunction = exports.isArray = exports.isObject = exports.isNull = exports.isUndefined = void 0;
- function isUndefined(val) {
- return Object.prototype.toString.call(val) === "[object Undefined]";
- }
- exports.isUndefined = isUndefined;
- function isNull(val) {
- return Object.prototype.toString.call(val) === "[object Null]";
- }
- exports.isNull = isNull;
- function isObject(val) {
- return Object.prototype.toString.call(val) === "[object Object]";
- }
- exports.isObject = isObject;
- function isArray(val) {
- return Object.prototype.toString.call(val) === "[object Array]";
- }
- exports.isArray = isArray;
- function isFunction(val) {
- return Object.prototype.toString.call(val) === "[object Function]";
- }
- exports.isFunction = isFunction;
- function isSet(val) {
- return Object.prototype.toString.call(val) === "[object Set]";
- }
- exports.isSet = isSet;
- function isMap(val) {
- return Object.prototype.toString.call(val) === "[object Map]";
- }
- exports.isMap = isMap;
- function stringify(value) {
- if (!isUndefined(value) && !isNull(value)) {
- if (isFunction(value === null || value === void 0 ? void 0 : value.toString)) {
- value = value.toString();
- }
- }
- return String(value);
- }
- exports.stringify = stringify;
|