0.3.0 • Published 5 months ago

trip-to-carbon-xyz v0.3.0

Weekly downloads
4
License
Unlicense
Repository
github
Last release
5 months ago

trip-to-carbon

A wrapper for the Trip to Carbon API.

Install it from npm:

npm install trip-to-carbon-xyz

Usage:

import { carbonFootprint } from 'trip-to-carbon-xyz'

const taxiFootprint = await carbonFootprint({
  token: 'YourAppToken', // optional
  country: 'USA',
  distance: {
    amount: 10,
    unit: 'miles',
    mode: 'taxi'
  }
})
console.log(`Your 10-mile taxi trip had a carbon footprint of ${taxiFootprint} kilograms.`)

const fuelFootprint = await carbonFootprint({
  token: 'YourAppToken', // optional
  country: 'GBR',
  fuel: {
    amount: 456,
    unit: 'gallons',
    type: 'jetFuel'
  }
})
0.3.0

5 months ago

0.2.5

1 year ago

0.2.3

2 years ago

0.2.4

2 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

5 years ago

0.1.0

5 years ago