Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ntwcklng/dilution
https://github.com/ntwcklng/dilution
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ntwcklng/dilution
- Owner: ntwcklng
- Created: 2018-01-01T19:37:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-04T08:39:19.000Z (almost 7 years ago)
- Last Synced: 2024-10-12T11:08:07.343Z (3 months ago)
- Language: JavaScript
- Size: 70.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# dilution
Calculate the dilution of 2 parts, like 1:2 for a 500ml bottle
## Install
1. Add this module to your dependencies
```bash
yarn add dilution
# or
npm install --save dilution
```## Usage
```js
const dilution = require('dilution')console.log(dilution(1, 2, 500)) //=> { part1: '167', part2: '333' }
console.log(dilution(50, 50, 500)) //=> { part1: '250', part2: '250' }
```## License
MIT - Marvin Mieth