UNPKG

@minofrk/msf-pretty-print

Version:

An opinionated pretty-printer for MSF format.

48 lines 813 B
var orderedKeys = [ 'est', 'sast', 'arxe', 'sorn', 'ele', 'korol', 'txifol', 'pit', 'luul', 'ka', 'evol', 'i', 'a', 'alsia', 'soom', 'ito', 'vastan', 'aptex', 'fixt', 'kit', 'seslax', 'fala', 'ov', 'slax', 'im', 'oprens', 'mit', 'ladan', 'kalte', 'evita', ]; var comparator = function (x, y) { var xIndex = orderedKeys.indexOf(x); var yIndex = orderedKeys.indexOf(y); if (xIndex !== -1 && yIndex !== -1) { return xIndex < yIndex ? -1 : 1; } if (xIndex !== -1 && yIndex === -1) { return -1; } if (xIndex === -1 && yIndex !== -1) { return 1; } return x < y ? -1 : 1; }; export default comparator; //# sourceMappingURL=comparator.js.map