Skip to content

eignatyev/molecular-mass

Repository files navigation

molecular-mass

Calculate molecular mass in atomic mass units

npm package

Install

yarn add molecular-mass

Use CLI

yarn molecular-mass H20 # => 18.02

Use API

import { calculateMolecularMass } from 'molecular-mass';

console.log(calculateMolecularMass('H2O')); // => 18.02

Source code

Clone

git clone https://github.com/eignatyev/molecular-mass.git
cd molecular-mass

Build and use

yarn
yarn build              # compile the project
node bin/index.js H20   # => 18.02

Run unit tests

yarn test

About

Molecular mass calculator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published