This PR introduces the ability to set the model used in CO2.js to use the Sustainable Web Model with a simple string, instead of you needing to add the object yourself.
Previously you might have needed to do this
import CO2 from "./co2.js";
import SustainableWebDesign from "./sustainable-web-design.js";
const co2 = new CO2({ model: 'swd' });
This can be awkward when consuming the distributed package from npm if you want to try out the Sustainable Web Design model in some sample code, without checking out the repo, and we haven't defined an export map to point to various models.
With this change you can now do this:
import CO2 from "./co2.js";
co2 = new CO2({ model: 'swd' });
This is much more helpful for using in notebooks, and things like Observable for quick demos.
This PR introduces the ability to set the model used in CO2.js to use the Sustainable Web Model with a simple string, instead of you needing to add the object yourself.
Previously you might have needed to do this
This can be awkward when consuming the distributed package from npm if you want to try out the Sustainable Web Design model in some sample code, without checking out the repo, and we haven't defined an export map to point to various models.
With this change you can now do this:
This is much more helpful for using in notebooks, and things like Observable for quick demos.