docparse-default-customer
v1.0.1
Published
Create default customer mongoose model in memory for use in docparse tests
Downloads
6
Readme
Docparse Default Customers
Create default customer mongoose model in memory for use in docparse tests
Dependency tracking by David
Usage
Default object
var inspect = require('eyespect').inspector()
var createDefaultCustomer = require('docparse-default-customer')
createDefaultCustomer(function(err, customer) {
if (err) {
inspect(err, 'error creating customer')
return;
}
inspect(customer.toObject(), 'created customer');
});
With custom data
var data = {
supplierCode: 'POS',
customerName: 'Point Oxygen Services'
};
var createDefaultCustomer = require('docparse-default-customer')
createDefaultCustomer(data, function(err, customer) {
if (err) {
inspect(err, 'error creating customer')
return;
}
inspect(customer.toObject(), 'default customer');
});
Installation
npm install docparse-default-customer