You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

fracty

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fracty - npm Package Compare versions

Comparing version

to
1.0.5

2

package.json
{
"name": "fracty",
"version": "1.0.4",
"version": "1.0.5",
"description": "Fracty is a decimal-to-fraction conversion module that solves the many well known problems with decimal-to-fraction conversion modules. Those common problems include overlooking conversion inaccuracies in the IEEE Standard for Float-Point Arithmetic (IEEE 754), mishandling numbers with trailing repeat patterns, and incorrect or partial pattern recognition. Fracty simply takes one argument, a number without any rounding and, in keeping with the most standard numbering conventions of monetary divisibility, etc., imagines that any trailing repeating patterns beyond two decimal places continue infinitely, and returns that input as a string of the fully reduced fraction equivalent.",

@@ -5,0 +5,0 @@ "main": "fracty.js",

@@ -11,36 +11,27 @@ # fracty

var fracty = require('fracty');
console.log(fracty(6.9024390243902));
```
Output will be:
```
6 37/41
```
 
 
```js
console.log(fracty(4.285714285714));
```
Output will be:
```
4 2/7
```
 
 
```js
console.log(fracty(-1.1425));
```
Output will be:
```
-1 57/400
```
 
## Notes

@@ -47,0 +38,0 @@