UNPKG

wavesurfer-react

Version:
39 lines 913 B
export const waveFormPropsList = [ "audioRate", "autoCenter", "backend", "barGap", "barHeight", "barRadius", "barWidth", "cursorColor", "cursorWidth", "fillParent", "height", "hideScrollbar", "interact", "media", "mediaControls", "minPxPerSec", "normalize", "progressColor", "splitChannels", "waveColor", "duration", "fetchParams" ]; const getWaveFormOptionsFromProps = (props) => { if (!props) return {}; return waveFormPropsList.reduce((waveFormOptions, optionName) => { if (!Object.prototype.hasOwnProperty.call(props, optionName)) { return waveFormOptions; } return { ...waveFormOptions, [optionName]: props[optionName] }; }, {}); }; export default getWaveFormOptionsFromProps; //# sourceMappingURL=getWaveFormOptionsFromProps.js.map