X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Flodash%2F_baseIndexOfWith.js;fp=.config%2Fcoc%2Fextensions%2Fnode_modules%2Fcoc-prettier%2Fnode_modules%2Flodash%2F_baseIndexOfWith.js;h=f815fe0ddae3bf27b7c2d51193dd211f73f79830;hb=3aba54c891969552833dbc350b3139e944e17a97;hp=0000000000000000000000000000000000000000;hpb=1def8ecce8e6f3aa32e6978d0ba7846a99b8de34;p=dotfiles%2F.git diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/lodash/_baseIndexOfWith.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/lodash/_baseIndexOfWith.js new file mode 100644 index 00000000..f815fe0d --- /dev/null +++ b/.config/coc/extensions/node_modules/coc-prettier/node_modules/lodash/_baseIndexOfWith.js @@ -0,0 +1,23 @@ +/** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ +function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; +} + +module.exports = baseIndexOfWith;