Nocturnal Pumpkin Maelstrom

    coach-core

    6.4.3 • Public • Published

    The Coach - core

    Build status

    Documentation | Changelog

    The coach

    The coach helps you find performance, best practice and privacy problems on your web page. coach-core holds the JavaScript functionality to analyse your page, the Coach project is the CLI.

    const coach = require('coach-core');
      
    // Get the JavaScript code that will analyse a page
    const domAdviceJavaScript = await coach.getDomAdvice();
    // Take the *domAdviceJavaScript* and run it in your browser and take care of the result.
    const domResult = ...
    
    const har = // we get the HAR from a browser
    
    // If your HARhar contains multiple pages (multiple runs etc) you can use the API
    // to get the page that you want
    const firstPageHar = coach.pickAPage(har, 0);
    
    const harResult = await coach.analyseHar(firstPageHar);
    
    // Say that you got the result from the browser in domAdviceResult
    // and the HAR result in harAdviceResult
    const coachResult = coach.merge(domResult, harResult);

    Install

    npm i coach-core

    DownloadsWeekly Downloads

    687

    Version

    6.4.3

    License

    MIT

    Unpacked Size

    2.04 MB

    Total Files

    139

    Last publish

    Collaborators

    • soulgalore