0.1.0 • Published 11 years ago

json-testdata v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

json-testdata

A range of different test JSON test data sources for use in database testing.

Installation

Install via npm:

$ npm install json-testdata

Usage

Just an array of JSON data

Just require the module to get a big array of JSON test data sources from npm:

var db = levelup('mydb', { valueEncoding: 'json' });
var testData = require('json-testdata');
var batch = testData.map(function (data, i) {
  return {
    type: 'put',
    key: i,
    value: data
  };
});
db.batch(batch);

An array of levelup data:

Do the above stuff for you:

var db = levelup('mydb', { valueEncoding: 'json' });
var batch = require('json-testdata').leveldata;
db.batch(batch);
0.1.0

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago