docs: function extract() {
    var args = mlutil.asArray.apply(null, arguments);
    var argLen = args.length;
    if (argLen < 1) {
      throw new Error('must specify paths to extract');
    }
  
    var extractdef = {};
  
    var arg = args[0];
    if (typeof arg === 'string' || arg instanceof String) {
      extractdef['extract-path'] = args;
    } else {
      var paths = arg.paths;
      if (typeof paths === 'string' || paths instanceof String) {
        extractdef['extract-path'] = [paths];
      } else if (Array.isArray(paths)) {
        extractdef['extract-path'] = paths;
      } else if (paths === void 0) {
        throw new Error('first argument does not have key for paths to extract');
      }
  
      var namespaces = arg.namespaces;
      if (namespaces !== void 0) {
        extractdef.namespaces = namespaces;
      }
  
      var selected = arg.selected;
      if (selected !== void 0) {
        extractdef.selected = selected;
      }
    }
  
    return {'extract-document-data': extractdef};
  }