1.0.4 • Published 6 years ago

ecoprint v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

ecoprint

Measure the ecological footprint of various products

Build Status XO code style

Install

$ npm install ecoprint

Usage

const ecoprint = require('ecoprint');

ecoprint['lamb'];
//=> { co2: 39.2, water: 8763 }

ecoprint.compare('tofu', 'tuna');
//=> [ { unit: 'co2', comp: { difference: -4.1, relation: 3.05 } } ]

ecoprint.units['water'];
//=> 'liters'

API

ecoprint.products

Get an array of all products and their ecological ecoprint.

ecoprint.units

Get an array of all magnitudes to compare and their corresponding units.

ecoprint.compare(origin, target)

origin

Type: string

Origin product name to compare with target.

target

Type: string

Target product name to compare with origin.

License

MIT © vikepic