You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, CO2.js allows developers to use/access the following functionality:
Perform carbon emissions estimates using existing models
Perform a green web hosting check
Access grid intensity data
This functionality is all exported from the main package, which means that adding additional things (models or data especially) means having to avoid naming conflicts for existing exports. It also makes importing and using the functions cumbersome.
Describe the solution you'd like
Introducing subpath exports would allow more organised means of exporting functionality, and make it easier to expand the features, functionality, and models in CO2.js. For example, the code above could look like this instead:
import{oneByte}from"@tgwf/co2/models";
As we look to add more data into CO2.js (see #244), named exports would make it possible to expose that data in a more meaningful manner without creating super long names for exported functions.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently, CO2.js allows developers to use/access the following functionality:
This functionality is all exported from the main package, which means that adding additional things (models or data especially) means having to avoid naming conflicts for existing exports. It also makes importing and using the functions cumbersome.
Example:
Describe the solution you'd like
Introducing subpath exports would allow more organised means of exporting functionality, and make it easier to expand the features, functionality, and models in CO2.js. For example, the code above could look like this instead:
As we look to add more data into CO2.js (see #244), named exports would make it possible to expose that data in a more meaningful manner without creating super long names for exported functions.
The text was updated successfully, but these errors were encountered: