I would like turf to treat inputs as purely functional, immutable objects. This is not currently happening in all cases, and could cause unexpected behavior in cases where people are expecting an object to be unchanged by an operation. Most of these issues could be dealt with by cloning the input at the beginning of the function, but I want to be able to do this in a consistent, performant, and resource-sensitive fashion, without relying on lodash's deepClone (since lodash is being removed from turf entirely to improve turf's footprint and compatibility with browserify).
If anyone has any suggestions for this, let me know. I probably want a module to do this so that npm dedupe can optimize library size in browserify builds, and we do not end up with a bunch of repeated code in each submodule (DRY, convenience, etc.).
I would like turf to treat inputs as purely functional, immutable objects. This is not currently happening in all cases, and could cause unexpected behavior in cases where people are expecting an object to be unchanged by an operation. Most of these issues could be dealt with by cloning the input at the beginning of the function, but I want to be able to do this in a consistent, performant, and resource-sensitive fashion, without relying on lodash's deepClone (since lodash is being removed from turf entirely to improve turf's footprint and compatibility with browserify).
If anyone has any suggestions for this, let me know. I probably want a module to do this so that
npm dedupecan optimize library size in browserify builds, and we do not end up with a bunch of repeated code in each submodule (DRY, convenience, etc.).