Skip to content

This method is like `_.find` except that it returns the index of the first element.

License

Notifications You must be signed in to change notification settings

afeiship/next-find-index

Repository files navigation

next-find-index

This method is like .find except that it returns the index of the first element.

usage:

  var users = [
    { 'user': 'barney',  'active': false },
    { 'user': 'fred',    'active': false },
    { 'user': 'pebbles', 'active': true }
  ];

  var index = nx.findIndex(users, function(_, chr) {
    return chr.user == 'barney';
  });

  // 0

About

This method is like `_.find` except that it returns the index of the first element.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published