项目原始demo,不改动
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.
 
 
 
 

22 líneas
576 B

  1. /**
  2. * A specialized version of `_.lastIndexOf` which performs strict equality
  3. * comparisons of values, i.e. `===`.
  4. *
  5. * @private
  6. * @param {Array} array The array to inspect.
  7. * @param {*} value The value to search for.
  8. * @param {number} fromIndex The index to search from.
  9. * @returns {number} Returns the index of the matched value, else `-1`.
  10. */
  11. function strictLastIndexOf(array, value, fromIndex) {
  12. var index = fromIndex + 1;
  13. while (index--) {
  14. if (array[index] === value) {
  15. return index;
  16. }
  17. }
  18. return index;
  19. }
  20. module.exports = strictLastIndexOf;