node package manager

docparse-default-invoice

Docparse Default Invoices

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

Build Status Dependency Status 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');
});

Installation

npm install docparse-default-invoice