Last active
December 16, 2015 18:15
-
-
Save milose/22ba457f1fa801fb6e72 to your computer and use it in GitHub Desktop.
orderByCi case insensitive order by for vue.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function orderByCi (arr, sortKey, reverse) { | |
arr = convertArray(arr) | |
if (!sortKey) { | |
return arr | |
} | |
arr = arr.map(function (item) { | |
return item.toUppercase(); | |
}); | |
return orderBy(arr, sortKey, reverse); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment