linear-preset-factory
Generate linear presets from unit conversion data
Install
npm i linear-preset-factory
Usage
require('linear-preset-factory')({
base: 'a',
conversions: {
a: [[0, 1], [0, 1]],
b: [[1, 2], [3, 4]],
c: [[0, -5], [0, 30]]
}
});
// =>
// {
// a_a: [[0, 1], [0, 1]],
// a_b: [[1, 2], [3, 4]],
// a_c: [[0, -5], [0, 30]]
// }
Related projects
- linear-presets: linear presets for common units.
- linear-converter: flexible linear converter.