UNPKG

@bizone-ai/json-transform-utils

Version:

Utilities for handling JSON transformers

15 lines 480 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.jsonpathJoin = exports.VALID_ID_REGEXP = void 0; exports.VALID_ID_REGEXP = /^[a-z_$][a-z0-9_$]*$/i; const jsonpathJoin = (...args) => { return args.reduce((a, c) => { if (!a) return c ?? ""; if (!c) return a; return a + (c[0] === "[" ? "" : ".") + c; }, ""); }; exports.jsonpathJoin = jsonpathJoin; //# sourceMappingURL=jsonpathJoin.js.map