ts-belt icon indicating copy to clipboard operation
ts-belt copied to clipboard

Feature request: Object Copying

Open kee-oth opened this issue 2 years ago • 1 comments

Hi!

Is a D.copy function planned?

Thanks!

kee-oth avatar Sep 07 '22 00:09 kee-oth

@kee-oth not sure, what's the purpose of D.copy, since all ts-belt functions return immutable data

mobily avatar Oct 21 '22 19:10 mobily

closing due to inactivity, feel free to reopen the issue if you need so :)

mobily avatar Nov 02 '22 19:11 mobily

What if we wanted to use an immutable input as input into a mutable function in the pipeline and thus needed to deep clone the object/array?

ex.

pipe(
  readOnlyArrayofReadOnlyObjects,
  D.deepClone,
  F.toMutable,
  customMutatingFunction
)

john-trashlab avatar Nov 28 '22 18:11 john-trashlab