node package manager

docparse-default-customer

Docparse Default Customers

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