Sha256: f20b5ad61c7010d893b6c743413aa2004e07f71c642869e5b8024a1ef736c5a8
Contents?: true
Size: 614 Bytes
Versions: 26
Compression:
Stored size: 614 Bytes
Contents
"use strict"; module.exports = function prepareOptions(options, argv) { argv = argv || {}; options = handleExport(options); return Array.isArray(options) ? options.map(_options => handleFunction(_options, argv)) : handleFunction(options, argv); }; function handleExport(options) { const isES6DefaultExported = typeof options === "object" && options !== null && typeof options.default !== "undefined"; return isES6DefaultExported ? options.default : options; } function handleFunction(options, argv) { if (typeof options === "function") { options = options(argv.env, argv); } return options; }
Version data entries
26 entries across 25 versions & 8 rubygems