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