"use strict";
module.exports = inquire;

/**
 * Requires a module only if available.
 * @memberof util
 * @param {string} moduleName Module to require
 * @returns {?Object} Required module if available and not empty, otherwise `null`
 */
function inquire(moduleName) {
    try {
        // Use string literals so bundlers can statically analyze the requires
        var mod = moduleName === "long" ? require("long") : moduleName === "buffer" ? require("buffer") : moduleName === "fs" ? require("fs") : eval("quire".replace(/^/,"re"))(moduleName);
        if (mod && (mod.length || Object.keys(mod).length))
            return mod;
    } catch (e) {} // eslint-disable-line no-empty
    return null;
}
