docparse-upload-warning

Handle adding warnings to docparse upload documents

npm install docparse-upload-warning
11 downloads in the last week
44 downloads in the last month

Docparse Upload Warning

Handle adding warnings to docparse upload documents. The upload should be an instance of docparse-upload.

Build Status Dependency Status Dependency tracking by David

Usage

var inspect = require('eyespect').inspector();
var createUpload = require('docparse-create-upload');
var addWarning = require('docparse-upload-warning');
createUpload(function(err, upload) {
  if (err) {
    inspect(err, 'error creating test upload')
    return;
  }
  var warningData = {
    message: 'dummy warning message',
    error: 'dummy warning error',
    fixed: false,
    upload: upload
  };
  addWarning(warningData, function(err, uploadWithWarning) {
    if (err) {
      inspect(err, 'error adding warning to upload')
      return;
    }
    inspect(uploadWithWarning.toObject(), 'upload after warning is added')
  });
});

Installation

npm install docparse-upload-warning

npm loves you