package.build.cjs.utils-hoist.array.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Base implementation for all Sentry JavaScript SDKs
The newest version!
Object.defineProperty(exports, '__esModule', { value: true });
/** Flattens a multi-dimensional array
*
* @deprecated This function is deprecated and will be removed in the next major version.
*/
function flatten(input) {
const result = [];
const flattenHelper = (input) => {
input.forEach((el) => {
if (Array.isArray(el)) {
flattenHelper(el );
} else {
result.push(el );
}
});
};
flattenHelper(input);
return result;
}
exports.flatten = flatten;
//# sourceMappingURL=array.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy