jashkenas / backbone

Give your JS App some Backbone with Models, Views, Collections, and Events
http://backbonejs.org
MIT License
28.1k stars 5.39k forks source link

Clarify relationships between set, add push and unshift #4269

Closed jgonggrijp closed 1 year ago

jgonggrijp commented 1 year ago

Closes #3496. I moved some of the documentation for Collection.add to Collection.set and added documentation on sorting, so that the latter now gives a complete overview of the options, return value and events. I added a reference from Collection.add to Collection.set and from Collection.{push,unshift} to Collection.add, clarifying how these methods differ from each other.

The updated documentation can be previewed here: https://cdn.statically.io/gh/jgonggrijp/backbone/document-add-push-unshift/index.html.

jgonggrijp commented 1 year ago

Thanks for the review!

No, I don't see "vivified" very often, either. I just moved it from the add section to the set section; I suppose @jashkenas wrote that in one of his poetic moments.