@uppy/provider-views
Version:
View library for Uppy remote provider plugins.
9 lines (8 loc) • 310 B
JavaScript
/**
* One-level copying is sufficient as mutations within our `partialTree` are limited to properties
* such as `.status`, `.cached`, `.nextPagePath`, and not `.data = { THIS }`.
*/
const shallowClone = (partialTree) => {
return partialTree.map((item) => ({ ...item }));
};
export default shallowClone;