Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

co-ne-db

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-ne-db

co wrapper for nedb

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

co-ne-db Build Status

Sorry for the crappy name, co-nedb was already taken but find() was returning a function instead of a cursor, making it impossible to use properly.

Installation

$ npm install co-ne-db

Usage

Just call then function provided by this module on the nedb datastore.

var wrap = require('co-ne-db');
var Datastore = require('nedb');
var db = new Datastore();
db = wrap(db);

co(function *() {
  yield db.insert({foo: 'bar'});
  var records = yield db.find({}).exec();
});

Note that find, findOne and count always return a cursor, to be able to chain sort, skip, etc, so you should always call exec to execute your query.

Keywords

FAQs

Package last updated on 18 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc