node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

docparse-default-invoice

Create default invoice mongoose model in memory for use in docparse tests

Docparse Default Invoices

Create default invoice mongoose model in memory for use in docparse tests

Dependency tracking by David

Usage

Default object

var inspect = require('eyespect').inspector()
var createDefaultInvoice = require('docparse-default-invoice')
createDefaultInvoice(function(err, invoice) {
  if (err) {
    inspect(err, 'error creating invoice')
    return;
  }
  inspect(invoice.toObject(), 'created invoice');
});

With custom data

var createBill = require('docparse-default-bill');
var createInvoice = require('docparse-default-invoice');
 
var bill = createBill();
createDefaultInvoice(data, function(err, invoice) {
  if (err) {
    inspect(err, 'error creating invoice')
    return;
  }
  inspect(invoice.toObject(), 'default invoice');
});

npm install docparse-default-invoice