@chubbyts/chubbyts-decode-encode
Version:
A simple decode/encode solution for json / jsonx / url-encoded / xml / yaml.
16 lines (15 loc) • 736 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isObject = exports.isArray = exports.isString = exports.isNumber = exports.isBoolean = exports.isNull = void 0;
const isNull = (value) => value === null;
exports.isNull = isNull;
const isBoolean = (value) => typeof value === 'boolean';
exports.isBoolean = isBoolean;
const isNumber = (value) => typeof value === 'number';
exports.isNumber = isNumber;
const isString = (value) => typeof value === 'string';
exports.isString = isString;
const isArray = (value) => Array.isArray(value);
exports.isArray = isArray;
const isObject = (value) => value !== null && typeof value === 'object' && value.constructor.name == 'Object';
exports.isObject = isObject;