Access Website Carbon's API for checking carbon emissions for websites.
import { site } from "jsr:@timharek/wcarbon";
const siteUrl = "example.org";
const result = await site(siteUrl);
import { data } from "jsr:@timharek/wcarbon";
const result = await data({ bytes: 1024, hasGreenHosting: false });
deno install --allow-net=api.websitecarbon.com \
-n wcarbon jsr:@timharek/wcarbon/cli
$ wcarbon timharek.no
$ wcarbon site timharek.no
$ wcarbon data 2048
$ wcarbon -h # for all available flags and commands
- Install Deno
- Run
deno task setup:hooks
- Now you can get to work! 😎