How to use the convert.moles function in convert

To help you get started, we’ve selected a few convert examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github reinpk / radioactive / radioactive.js View on Github external
var radioactivityProfile = function (years) {
            var Bq = {};
            Bq.total = 0;
            for (var i = 0; i < C.length; i++) {
                var Ni = 0;
                for (var k = 0; k < C[i].length; k++) {
                    Ni += C[i][k] * Math.exp(-lambda[k] * years);
                }
                Bq[chain[i]] = convert.moles(lambda[i] * Math.max(0, Ni)) / (365.25 * 24 * 60 * 60);
                Bq.total += Bq[chain[i]];
            }
            return Bq;
        };

convert

The smallest & fastest library for really easy, totally type-safe unit conversions in TypeScript & JavaScript

MIT
Latest version published 22 days ago

Package Health Score

80 / 100
Full package analysis