talyssonoc / structure

A simple schema/attributes library built on top of modern JavaScript
https://structure.js.org/
MIT License
301 stars 20 forks source link

Implement clone method #97

Closed talyssonoc closed 5 years ago

talyssonoc commented 5 years ago

@loweoj you can do it explicitly:

const clonedUser = user.clone({ favoriteBook: user.favoriteBook.clone() })

I want to leave it open that way for cases when you want to clone some of the nested structures but not others, this is the most general case.