@octoguide/sorting-utils

<dl> <dt><a href="#sortByName">sortByName</a> ⇒ <code>Array</code></dt> <dd><p>sort the objects by the name field</p> </dd> <dt><a href="#sortByDate">sortByDate</a> ⇒ <code>Array</code></dt> <dd><p>sort the objects by the field specified that needs to be

Usage no npm install needed!

<script type="module">
  import octoguideSortingUtils from 'https://cdn.skypack.dev/@octoguide/sorting-utils';
</script>

README

Constants

sortByNameArray

sort the objects by the name field

sortByDateArray

sort the objects by the field specified that needs to be a date type

sortByFieldArray

sort the objects by the field specified

sortByName ⇒ Array

sort the objects by the name field

Kind: global constant
Returns: Array - of objects sorted by name

Param Type Description
source Array the source array..

sortByDate ⇒ Array

sort the objects by the field specified that needs to be a date type

Kind: global constant
Returns: Array - of objects sorted by date

Param Type Description
source Array the source array..
sortField Array the date field

sortByField ⇒ Array

sort the objects by the field specified

Kind: global constant
Returns: Array - of objects sorted by date

Param Type Description
source Array the source array..
sortField Array the field to sort by