JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q31278F
  • License BSD

create supplier objects for use in testing

Package Exports

  • docparse-create-supplier

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (docparse-create-supplier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Create docparse supplier objects for use in testing. The mongoose database is mocked out with an in-memory store

Build Status

Dependency Status Dependency tracking by David

Usage

Default object

var inspect = require('eyespect').inspector()
var create = require('docparse-create-supplier')
create(function(err, supplier) {
  if (err) {
    inspect(err, 'error creating supplier')
    return;
  }
  inspect(supplier.toObject(), 'created supplier');
});

With custom data

var data = {
  supplierCode: 'FGS',
  supplierName: 'Foo Gas Supply'
}
var create = require('docparse-create-supplier')
create(data, function(err, supplier) {
  if (err) {
    inspect(err, 'error creating supplier')
    return;
  }
  inspect(supplier.toObject(), 'created supplier');
});

Installation

npm install --save-dev docparse-create-supplier