import { createAddAll } from './add-all.js';
import last from 'it-last';
import { configure } from '../lib/configure.js';
export function createAdd(config) {
  const all = createAddAll(config);
  return configure(() => {
    async function add(path, options = {}) {
      return last(all([{
          path,
          ...options
        }], options));
    }
    return add;
  })(config);
}