UNPKG

monk-import-export

Version:

Simple import & export sorting ESLint plugin

9 lines (8 loc) 306 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compare = void 0; const collator = new Intl.Collator('en', { numeric: true, sensitivity: 'base' }); function compare(a, b) { return collator.compare(a, b) || (a < b ? -1 : a > b ? 1 : 0); } exports.compare = compare;