Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

limit is not obeyed when iterating collections #527

Open
robertjd opened this issue Aug 17, 2016 · 1 comment
Open

limit is not obeyed when iterating collections #527

robertjd opened this issue Aug 17, 2016 · 1 comment
Labels

Comments

@robertjd
Copy link
Member

robertjd commented Aug 17, 2016

Take this code:

directory.getAccounts({
  limit: 5
}, function(err, accounts){
  accounts.each(function(account, next){
    console.log(account.href);
    next();
  });
});

I would expect that there is only five accounts to visit with my each iterator. But in reality, it continues past the first 5, and visits all of the items in the collection.

@omgitstom
Copy link
Member

This is actually the expected behavior. I'm going to move this to backlog

@omgitstom omgitstom removed the open label Aug 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants