Updated docs

This commit is contained in:
Zakary Timson 2021-02-01 23:56:05 -05:00
parent a320f3b4c8
commit e339af3874
2 changed files with 19 additions and 1 deletions

View File

@ -21,6 +21,23 @@ export class MyCustomClass {
}
```
## Documentation
### Decorators
| Decorator | Description |
|-----------|-------------|
| @LocalStorage(defaultValue: any, options: WebStorageOptions) | Syncs property to LocalStorage item under the same name |
| @SessionStorage(defaultValue: any, options: WebStorageOptions) | Syncs property to SessionStorage item under the same name |
### WebStorageOptions
| Options | Description |
|---------|-------------|
| default | Default value, same as decorator's first argument |
| encryptWith | Secret key to encrypt stored values with |
| key | Key to reference value inside local/session storage (Defaults to the property name) |
## Caveats
### Custom Functions

View File

@ -1,7 +1,8 @@
{
"name": "webstorage-decorators",
"version": "3.1.5",
"version": "3.2.5",
"description": "Decorators to sync class properties to Local/Session storage",
"repository": "https://github.com/ztimson/WebstorageDecorators",
"main": "./lib/index.js",
"typings": "./lib/index.d.ts",
"scripts": {