"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var from_glob_files_1 = require("./from-glob-files");
var loaders = [from_glob_files_1.fromGlobFiles];
function isLoader(loader) {
    return typeof loader !== 'undefined';
}
function loadDocuments(pointer) {
    var loader = undefined;
    loaders.some(function (fn) {
        var _loader = fn(pointer);
        if (_loader) {
            loader = _loader;
            return true;
        }
        return false;
    });
    if (isLoader(loader)) {
        return loader();
    }
    throw new Error("Couldn't handle " + pointer);
}
exports.loadDocuments = loadDocuments;
//# sourceMappingURL=index.js.map