grevory/angular-local-storage ? reverse-engineered prompt
Reverse engineered prompt
Build me a small AngularJS module that makes it easy to save and read data from the browser’s storage, with a cookie fallback when local storage isn’t available.
I want it to feel simple to use in an app, so I can set a prefix, choose localStorage or sessionStorage, turn cookie fallback on or off, and configure cookie expiry, path, secure, and domain. It should let me set, get, remove, and clear values, list saved keys, check whether storage is supported, and bind a scope value so it stays in sync automatically. If possible, have it notify the app with events when items are set or removed.
Please include a basic demo page and some tests, and make sure there’s a built version I can drop into an AngularJS app and add as a dependency. If anything about the current browser APIs has changed, look up the latest docs online and use the right approach.
Are you gonna build this?
make sure you review the code using coderabbit