node package manager


Docparse Default Bills

Create default bill mongoose model in memory for use in docparse tests. The bill is an instance of docparse-bill but is not saved to any database.

Build Status Dependency Status Dependency tracking by David


Default object

var inspect = require('eyespect').inspector()
var createDefaultBill = require('docparse-default-bill')
createDefaultBill(function(err, bill) {
  if (err) {
    inspect(err, 'error creating bill')
  inspect(bill.toObject(), 'created bill');

With custom data

var mongoose = require('mongoose');
var ObjectId = mongoose.Types.ObjectId;
var createDefaulttBill = require('docparse-default-bill')
var loginID = new ObjectId();
var customerID = new ObjectId();
var supplierID = new ObjectId();
var data = {
  accountNumber: 'bar bill number',
  billNumber: 'bar bill number',
  textPages: ['bar page 1 text', 'bar page 2 text'],
  hash: 'bar hash',
  supplierID: supplierID,
  supplierCode: 'POS',
  loginID: loginID,
  customerID: customerID
createDefaultBill(data, function(err, bill) {
  if (err) {
    inspect(err, 'error creating bill')
  inspect(bill.toObject(), 'default bill');


npm install docparse-default-bill

Example Installation

npm install docparse-default-bill eyespect mongoose