X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2F_strictLastIndexOf.js;fp=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2F_strictLastIndexOf.js;h=d7310dcc23629ce1550043095f6b4c54d4ab640b;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-uncss/node_modules/lodash/_strictLastIndexOf.js b/node_modules/grunt-uncss/node_modules/lodash/_strictLastIndexOf.js new file mode 100644 index 000000000..d7310dcc2 --- /dev/null +++ b/node_modules/grunt-uncss/node_modules/lodash/_strictLastIndexOf.js @@ -0,0 +1,21 @@ +/** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; +} + +module.exports = strictLastIndexOf;