New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stringbuffer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stringbuffer

A lightweight, zero dependencies, StringBuffer implementation for fast and memory efficient string concatenation.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
590
-23.18%
Maintainers
1
Weekly downloads
 
Created
Source

{mon}{tin}godb

A wrapper over MongoDB / TingoDB which allows to quickly switch between them. This allows to easily run in development environments applications that will require a full MongoDB, i.e. for prototyping or proof of concept versions.

Installation

npm install montingodb

Usage

var db = require("montingodb");

// to use tingodb pass a directory name or use the tingodb() method
db.initialize("./data", ["collection1", "collection2", ...], callback);
db.tingodb("./data", ["collection1", "collection2", ...], callback);

// to use mongodb pass a mongodb connection url or use the mongodb() method
db.initialize("mongodb://localhost/dbname", ["collection1", "collection2", ...], callback);
db.tingodb("mongodb://localhost/dbname", ["collection1", "collection2", ...], callback);

// callback
function callback(err) {
    if(err) ...
}

// db.db contains the original MongoDB / TingoDB object
db.db.addUser(...);

// references to collections are automatically added 
db.collection1.insert(...);

// a helper "findToArray" method is added to the collection ...
db.collection1.findToArray(query, callback)
db.collection1.find(query).toArray(callback)

// ... for a shorter syntax in coffeescript-like languages
db.collection1.findToArray query, (err, data) ->
    console.log data

Keywords

string

FAQs

Package last updated on 15 Feb 2016

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