X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Funcss%2Fnode_modules%2Flodash%2Finternal%2FbaseSortBy.js;fp=node_modules%2Funcss%2Fnode_modules%2Flodash%2Finternal%2FbaseSortBy.js;h=fec0afeb78f10e598eb82cf8baf6e0e96ddb8b38;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/uncss/node_modules/lodash/internal/baseSortBy.js b/node_modules/uncss/node_modules/lodash/internal/baseSortBy.js new file mode 100644 index 000000000..fec0afeb7 --- /dev/null +++ b/node_modules/uncss/node_modules/lodash/internal/baseSortBy.js @@ -0,0 +1,21 @@ +/** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ +function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; +} + +module.exports = baseSortBy;