Package Exports
- linear-preset-any-to-any
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (linear-preset-any-to-any) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
linear-preset-any-to-any
Generate linear presets for any to any conversions
Install
npm i linear-preset-any-to-any
Usage
var Decimal = require('linear-arbitrary-precision')(require('floating-adapter'));
var anyToAny = require('linear-preset-any-to-any')(Decimal);
var temp = require('linear-presets-temperature').conversions;
// all numbers are Decimal
anyToAny(temp, 'kelvin', 'fahrenheit'); // => [[273.15, 373.15], [32, 212]]
anyToAny(temp, 'celsius', 'fahrenheit'); // => [[0, 100], [32, 212]]
anyToAny(temp, 'fahrenheit', 'celsius'); // => [[32, 212], [0, 100]]
anyToAny(temp, 'celsius', 'celsius'); // => [[0, 1], [0, 1]]
Related projects
- linear-presets: linear presets for common units.
- linear-converter: flexible linear converter.