docparse-default-supplier

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

npm install docparse-default-supplier
12 downloads in the last month

Docparse Default Suppliers

Create default supplier 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 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

npm loves you