tymondesigns / angular-locker

🗄️ A simple & configurable abstraction for local/session storage in angular js projects
https://npm.im/angular-locker
MIT License
314 stars 42 forks source link

Allow separator to be in the namespace #14

Closed foxdavidj closed 9 years ago

foxdavidj commented 9 years ago

The following change allows a user to specify a namespace which contains the separator.

Example: namespace: "foo.bar"; separator: "."

What this fixes:

  1. locker.all() now reports the keys in the above use case
  2. locker.clean() removes all the keys

What was changed:

  1. locker.all() now uses indexOf and substring to determine the presence of the namespace
tymondesigns commented 9 years ago

Thanks!