Socket
Socket
Sign inDemoInstall

@react-native-community/async-storage-backend-web

Package Overview
Dependencies
486
Maintainers
31
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-rc.0 to 2.0.0-rc.1

6

package.json
{
"name": "@react-native-community/async-storage-backend-web",
"version": "2.0.0-rc.0",
"version": "2.0.0-rc.1",
"main": "build/index.js",

@@ -18,3 +18,3 @@ "types": "types/index.d.ts",

"dependencies": {
"@react-native-community/async-storage": "^2.0.0-rc.0"
"@react-native-community/async-storage": "^2.0.0-rc.1"
},

@@ -30,3 +30,3 @@ "peerDependencies": {

},
"gitHead": "a5bf325a390f4eaadeb1a0fbfb31d629decd83df"
"gitHead": "a8e83d1be5dfcf24d0d6547badb24f53cf2756f5"
}
# Storage Backend: Web
// todo
An AsyncStorage backend, targeting web platform. Uses either [`localStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) or [`sessionStorage`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage).
## Installation
// todo
```bash
$ yarn add @react-native-community/async-storage@next
$ yarn add @react-native-community/async-storage-backend-web@next
```
## Usage
// todo
```typescript
import WebStorage from '@react-native-community/async-storage-backend-web';
import AsyncStorageFactory from '@react-native-community/async-storage';
type MyModel = {};
const webStorage = new WebStorage(true);
const storage = AsyncStorageFactory.create<MyModel>(webStorage);
export default storage;
```
## Options
`WebStorage` accepts a single `boolean` argument, deciding if `sessionStorage` should be used instead of `localStorage`. Default is `false`.
## License
MIT
MIT.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc