Skip to content

Consistent sorting functions #59

@amoskyler

Description

@amoskyler

ampersand-subcollection and ampersand-collection both use different sort methods.

Ampersand-subcollection uses lodash sortBy, and ampersand-collection uses native array sort. I ran into an issue where I was using the wrong sort method.

Not sure what the best change to make is, but maybe editing docs to make it more clear that collection/sub-collection have different APIs or normalizing the API to use the same sort method.

https://github.com/AmpersandJS/ampersand-subcollection/blob/master/ampersand-subcollection.js#L175

https://github.com/AmpersandJS/ampersand-collection/blob/master/ampersand-collection.js#L238

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions