X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fhelpers%2FTechnique.js;h=7ec22d3b90e01df1aa9b3918643d37f9200829ff;hb=6c51a1601e74bc822ccafe984d525d0e9a35ca28;hp=ea60cc71653d91c50887050af7843e671dfe2647;hpb=6f34dd7c00bf0bd152a97b175390be00c3a0ba31;p=alttp.git diff --git a/resources/js/helpers/Technique.js b/resources/js/helpers/Technique.js index ea60cc7..7ec22d3 100644 --- a/resources/js/helpers/Technique.js +++ b/resources/js/helpers/Technique.js @@ -10,6 +10,9 @@ export const getTranslation = (tech, prop, lang) => { return tech[prop]; }; +export const compareTranslation = (prop, lang) => (a, b) => + getTranslation(a, prop, lang).localeCompare(getTranslation(b, prop, lang)); + export default { getTranslation, };