Skip to content

Instantly share code, notes, and snippets.

@milose
Last active December 16, 2015 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milose/22ba457f1fa801fb6e72 to your computer and use it in GitHub Desktop.
Save milose/22ba457f1fa801fb6e72 to your computer and use it in GitHub Desktop.
orderByCi case insensitive order by for vue.js
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