docparse-default-supplier

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

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(errsupplier) {
  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(errsupplier) {
  if (err) {
    inspect(err, 'error creating supplier')
    return;
  }
  inspect(supplier.toObject(), 'default supplier');
});

npm install docparse-default-supplier