node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

docparse-default-supplier

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