UNPKG

wavesurfer.js

Version:

Interactive navigable audio visualization using Web Audio and Canvas

17 lines (16 loc) 398 B
/** * Extend an object shallowly with others * * @param {Object} dest The target object * @param {Object[]} sources The objects to use for extending * * @return {Object} Merged object */ export default function extend(dest, ...sources) { sources.forEach(source => { Object.keys(source).forEach(key => { dest[key] = source[key]; }); }); return dest; }