JSFiddle - React, Tailwind, and code Playground

JavaScript

/**
 * Regular expression to test for pepper PPAPI plugins
 */
var PPAPI_REGEX = /^(lib)?pep(per)?flashplayer/i;

/**
 * Returns true if the current agent is running PPAPI version of flash
 */
function runningPepperFlash() {
    if (navigator.plugins) {
        for (var i = 0, count = navigator.plugins.length; i < count; i++) {
            var plugin = navigator.plugins[i].filename;
            var has_pepper = PPAPI_REGEX.test(plugin);
            if (has_pepper) {
                return true;
            }
        }
        return false;
    }
}

/**
 * Test case against the three (3) known plugin file types (win,mac,linux)
 */
function executeTestCases() {
    var plugins = ['pepflashplayer.dll', 'PepperFlashPlayer.plugin', 'libpepflashplayer.so'];
    for (var i = 0; i < plugins.length; i++) {
        var has_pepper = PPAPI_REGEX.test(plugins[i]);
        console.log('Test Case Plugin Matched? ', plugins[i], ': ', has_pepper);
    }

}

console.log('Currently Running Pepper?', runningPepperFlash());

executeTestCases();