main
HerrHase 2 years ago
parent 54a471c009
commit 4fcbeaceea

@ -62,6 +62,8 @@ Options:
## OrderBy
Order elements in Array by name of property, default is 'asc', a '-' of the name is 'desc'.
Basic Usage:
```

@ -14,11 +14,11 @@ describe('OrderBy', function () {
]
const data = orderBy(options, [
{ index: 0 },
{ index: 1 },
{ index: 2 },
{ index: 3 },
{ index: 4 }
{ index: 1 },
{ index: 0 },
{ index: 4 },
{ index: 2 }
])
assert.equal(data[0].index, 4)
@ -31,11 +31,11 @@ describe('OrderBy', function () {
]
const data = orderBy(options, [
{ index: 0 },
{ index: 1 },
{ index: 2 },
{ index: 3 },
{ index: 4 }
{ index: 1 },
{ index: 0 },
{ index: 4 },
{ index: 2 }
])
assert.equal(data[0].index, 0)

Loading…
Cancel
Save