UNPKG

@trackr/effects-gain

Version:

A subpackage of trackr that contains gain effects.

23 lines (22 loc) 797 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.inspectText = void 0; function inspectText(obj, ignoreProps = []) { // transform object to string if ((typeof obj == 'string' || obj instanceof String)) { return `${obj}`; } const keys = Object.keys(obj); let text = []; for (let k of keys) { if ((typeof obj[k] == 'string' || obj[k] instanceof String) && ignoreProps.indexOf(k) === -1) { text.push(obj[k]); } if (typeof obj[k] === 'object' && obj[k] !== null && !(obj[k] instanceof Date)) { const deepText = inspectText(obj[k], ignoreProps); text.push(deepText); } } return `${text.join(' ')}`; } exports.inspectText = inspectText;