const outboard = require("outboard");
const { read } = require("./internal/input");

async function lint(input, options = {}) {
  const source = read(input);
  return outboard.lint(source, options);
}

function load(input, options = {}) {
  const source = read(input);
  return outboard.load(source, options, true);
}

module.exports = {
  parse: outboard.parse,
  validate: outboard.validate,

  read,
  load,
  lint
};

const outboard = require("outboard");
const { read } = require("./internal/input");

async function lint(input, options = {}) {
  const source = read(input);
  return outboard.lint(source, options);
}

function load(input, options = {}) {
  const source = read(input);
  return outboard.load(source, options, true);
}

function loadLoose(input, options = {}) {
  const source = read(input);
  return outboard.load(source, options, false);
}

module.exports = {
  parse: outboard.parse,
  validate: outboard.validate,

  read,
  load,
  loadLoose,
  lint
};

add load loose