https://github.com/kanaries/kanaries-adapters
https://github.com/kanaries/kanaries-adapters
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanaries/kanaries-adapters
- Owner: Kanaries
- License: apache-2.0
- Created: 2022-09-15T16:48:21.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-16T00:01:09.000Z (about 3 years ago)
- Last Synced: 2025-01-05T17:23:12.120Z (9 months ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @kanaries/adapters
`@kanaries/adapters` is a lib for features required to be running on both node and browser, but relay on a different implementation in different environment.For example, storage in browser is implemented based on indexedDB while storage in node is implemented based on file system.
## Usage
```bash
npm install --save @kanaries/adapter# or
yarn add @kanaries/adapter
```## API
VIStorage
```ts
import { VIStorage } from '@kanaries/adapter';const sto = new VIStorage('test');
sto.init();
sto.setItem('age', 100)
```