stormpath/stormpath-sdk-node

`limit` is not obeyed when iterating collections

Opened this issue · 1 comments

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.

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