As clearly as possible, describe the changes made in the pull request. You should at least detail "what changes have been made" and "what the results of these changes will be".
This change exposes all private functions and variables that are available in the OneByte and Sustainable Web Design Model classes that are used in CO2.js. The change would allow developers to access energy estimation functions, embodied and operational emissions estimation functions, and other constants that are included in those classes.
As a result of this change, developers can access these functions as below:
import {co2} from "@tgwf/co2";
let swdmv3 = new co2().SustainableWebDesignV3();
// Access the Sustainable Web Design Model directly.
const operationalEnergy = swdmv3.operationalEnergyPerSegment(1000);
console.log(operationalEnergy);
// Access the Sustainable Web Design Model via CO2.js API (perByte/perVisit functions)
const emissions = new co2();
const estimate = emissions.perByte(1000)
Triage
Type of change
Please select any of the below items that are appropriate.
This pull request:
Related issue/s
Please list below any issues this pull request is related to.
195
Docs changes required
Do any changes made in this pull request require parts of the CO2.js documentation to be updated?
It has been decided that at this time, this change will not be documented.
If you answered "Yes", please create an corresponding issue in our Developer Documentation repository.
Describe the changes made in this pull request
As clearly as possible, describe the changes made in the pull request. You should at least detail "what changes have been made" and "what the results of these changes will be".
This change exposes all private functions and variables that are available in the OneByte and Sustainable Web Design Model classes that are used in CO2.js. The change would allow developers to access energy estimation functions, embodied and operational emissions estimation functions, and other constants that are included in those classes.
As a result of this change, developers can access these functions as below: