persona-community-5/.pnpm-store/v3/files/8f/c8b5df277d171843a6d3097539858266dec2c76786f2401ca9ecfe5dcb7a31f441388e6fce3f80b6d3e1b29f077d54cc3b649b6da293cf741b36d3106e4c5e
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

17 lines
408 B
Plaintext

/*
Fraction.js v5.0.0 10/1/2024
https://raw.org/article/rational-numbers-in-javascript/
Copyright (c) 2024, Robert Eisele (https://raw.org/)
Licensed under the MIT license.
*/
const Fraction = require('fraction.js');
function closestTapeMeasure(frac) {
// A tape measure is usually divided in parts of 1/16
return Fraction(frac).roundTo("1/16");
}
console.log(closestTapeMeasure("1/3")); // 5/16