docparse-default-supplier

    1.0.2 • Public • Published

    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

    Keywords

    none

    Install

    npm i docparse-default-supplier

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    BSD

    Last publish

    Collaborators

    • clewfirst