Lodash: Does _.partition maintain sort order?

Created on 13 Sep 2016  路  3Comments  路  Source: lodash/lodash

I've done some quick testing and it appears so, but I'm curious if this can be relied upon.

That is, will a sorted array, once partitioned, result in two sorted arrays?

question

Most helpful comment

Would you accept a PR adding this guarantee into the documentation and a test ensuring it stays that way? @jdalton

All 3 comments

That is, will a sorted array, once partitioned, result in two sorted arrays?

Yep. It should.

Would you accept a PR adding this guarantee into the documentation and a test ensuring it stays that way? @jdalton

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dwoldrich picture dwoldrich  路  3Comments

thoraage picture thoraage  路  3Comments

andreineculau picture andreineculau  路  3Comments

erykpiast picture erykpiast  路  3Comments

rtheunissen picture rtheunissen  路  3Comments