monsur/jscache — pull request #9 by nickwb (2013-04-16 07:33:03+00:00)
Title: Added Cache.removeWhere to API

Hello!
Another change for your consideration. This change should be 100% non-breaking.

It adds a new function, Cache.removeWhere:
> The Cache.removeWhere(test) function scans through each item in the
> cache and removes that item if it passes the supplied test.

Here is an example of its usage.
```javascript
cache.setItem('Adam', new Person());
cache.setItem('Andrew', new Person());
cache.setItem('Bob', new Person());

// Remove people from the cache if the key starts with 'A'
cache.removeWhere(function(key, value) {
return /^A/.test(key);
});
```

This pull includes new tests, as well as updated documentation.