_compare-by-length.js 222 B

1234567
  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 (arr1, arr2) { return toPosInt(arr1.length) - toPosInt(arr2.length); };