1
0

_compare-by-length.js 211 B

123456789
  1. // Used internally to sort array of lists by length
  2. 'use strict';
  3. var toPosInt = require('../../number/to-pos-integer');
  4. module.exports = function (a, b) {
  5. return toPosInt(a.length) - toPosInt(b.length);
  6. };