normalizeExtraction(config = null, output = null) {
        config = config || {};

        if (typeof config === 'string') {
            if (output !== null || !config.endsWith('.js')) {
                throw new Error(
                    'mix.extract(string) expects a file path as its only argument'
                );
            }

            config = { to: config };
        } else if (typeof config === 'function') {
            config = { test: config };
        } else if (Array.isArray(config)) {
            config = { test: this.buildLibraryRegex(config) };
        }

        return {
            to: output || null,
            ...config,
            test: config.test || this.buildLibraryRegex(config.libraries || [])
        };
    }
@param {ExtractConfig|null} [config]
@param {string} [output]
@returns {Extraction}