nedb-async-await
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

NeDB Async/Await

Async/Await (Promise) Wrapper for NeDB

Getting Started

Install with: npm install nedb-async-await.

Usage

Example using async and await:

import { Datastore } from "nedb-async-await";
 
async function doSomething() {
  const users = Datastore({
    filename:  'database.json',
    autoload: true
  });
 
  await users.insert([
    { _id: 1, name: 'John Doe' },
    { _id: 2, name: 'Jane Doe' },
  ]);
 
  let john = await users.findOne({ name: 'John Doe' });
 
  console.log(john);
  // { _id: 1, name: 'John Doe' }
}

More coming soon.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    10
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    10
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i nedb-async-await

Weekly Downloads

10

Version

0.1.2

License

SEE LICENSE

Unpacked Size

8.91 kB

Total Files

10

Last publish

Collaborators

  • markrabey