Skip to content

javiercejudo/linear-converter-to-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linear-converter-to-go

Build Status Coverage Status Code Climate

Zero configuration linear converter with floating precision.

Install

npm i linear-converter-to-go

Usage

See live playground.

var lc = require('linear-converter-to-go');
var temp = lc.PRESETS.temperature.conversions;
var cToF = lc.conversion(temp, 'celsius', 'fahrenheit');

lc.convert(cToF, 25).toFixed(3); // => '77.000'

// f(x) = 3x + 1
lc.convert([[0, 1], [1, 4]], 5); // => 16

Unlike linear-converter, linear-converter-to-go always returns primitive numbers.

See CodePen example.

For more documentation, see linear-converter.

Related projects

About

Zero configuration linear converter with built-in conversions for common units

Resources

License

Stars

Watchers

Forks

Packages

No packages published