map-transform-cjs
Version:
MapTransform with CJS support
49 lines (48 loc) • 1.87 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/is.ts
var is_exports = {};
__export(is_exports, {
isArrayPath: () => isArrayPath,
isNonEmptyArray: () => isNonEmptyArray,
isNotNullOrUndefined: () => isNotNullOrUndefined,
isNullOrUndefined: () => isNullOrUndefined,
isObject: () => isObject,
isPath: () => isPath,
isString: () => isString
});
module.exports = __toCommonJS(is_exports);
var isObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
var isString = (value) => typeof value === "string";
var isPath = (value) => typeof value === "string";
var isArrayPath = (value) => isPath(value) && value.endsWith("[]");
var isNullOrUndefined = (value) => value === null || value === void 0;
var isNotNullOrUndefined = (value) => !isNullOrUndefined(value);
var isNonEmptyArray = (value) => Array.isArray(value) && value.length > 0;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
isArrayPath,
isNonEmptyArray,
isNotNullOrUndefined,
isNullOrUndefined,
isObject,
isPath,
isString
});
//# sourceMappingURL=is.cjs.map