X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Finternal%2FcreateSortedIndex.js;fp=node_modules%2Fgrunt-legacy-log%2Fnode_modules%2Flodash%2Finternal%2FcreateSortedIndex.js;h=86c78520c9bc7359c2667693fba13109cc1412ae;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/internal/createSortedIndex.js b/node_modules/grunt-legacy-log/node_modules/lodash/internal/createSortedIndex.js new file mode 100644 index 000000000..86c78520c --- /dev/null +++ b/node_modules/grunt-legacy-log/node_modules/lodash/internal/createSortedIndex.js @@ -0,0 +1,20 @@ +var baseCallback = require('./baseCallback'), + binaryIndex = require('./binaryIndex'), + binaryIndexBy = require('./binaryIndexBy'); + +/** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ +function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + return iteratee == null + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, baseCallback(iteratee, thisArg, 1), retHighest); + }; +} + +module.exports = createSortedIndex;