@arcblock/did-auth-storage-nedb

1.7.1 • Public • Published

did-auth-storage-nedb

styled with prettier

Storage engine that uses nedb to store data, implements interfaces defined in @arcblock/did-auth-storage.

Table of Contents

Install

npm install @arcblock/did-auth-storage-nedb
// or
yarn add @arcblock/did-auth-storage-nedb

Usage

const DiskStorage = require('@arcblock/did-auth-storage-nedb');

const storage = new DiskStorage({
  dbPath: '/path/to/db',
});

// Listen on events of the storage
storage.on('create', d => console.log('create', d));
storage.on('update', d => console.log('update', d));
storage.on('destroy', d => console.log('destroy', d));

(async () => {
  const token = '123456';
  const item = await storage.create(token);
})();

Contributors

Name Website
wangshijun https://ocap.arcblock.io

Package Sidebar

Install

npm i @arcblock/did-auth-storage-nedb

Weekly Downloads

158

Version

1.7.1

License

Apache-2.0

Unpacked Size

8.84 kB

Total Files

5

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a
  • gxw