docparse-default-invoice
v1.0.1
Published
Create default invoice mongoose model in memory for use in docparse tests
Downloads
3
Readme
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');
});
Installation
npm install docparse-default-invoice