UNPKG

xml2customjs

Version:

Library to custom convert an XML into a Javascript object or JSON

22 lines 702 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.transformArray = void 0; const index_1 = require("./index"); /** * This function returns an array with its object items transformed according to * a given set of options * @param param * @returns array */ function transformArray(array, options) { return array.map((value) => { const newValue = index_1.isObject(value) ? index_1.transformObject(value, options) : Array.isArray(value) ? transformArray(value, options) : value; return newValue; }); } exports.transformArray = transformArray; //# sourceMappingURL=transform-array.js.map