{
  "_id": "num2fraction",
  "maintainers": [
    {
      "name": "yisi",
      "email": "yiorsi@gmail.com"
    }
  ],
  "keywords": [
    "fraction",
    "number",
    "math",
    "maths",
    "arithmetic",
    "gcd",
    "rational"
  ],
  "dist-tags": {
    "latest": "1.2.2"
  },
  "author": {
    "name": "yisi",
    "email": "yiorsi@gmail.com",
    "url": "http://iyunlu.com/view"
  },
  "_rev": "11-43bcd9b8f5ca76cc52a54bf243a75ce8",
  "description": "Convert number to fraction",
  "readme": "# num2fraction\n\n[![Build Status](https://travis-ci.org/yisibl/num2fraction.svg)](https://travis-ci.org/yisibl/num2fraction) \n[![NPM Downloads](https://img.shields.io/npm/dm/num2fraction.svg?style=flat)](https://www.npmjs.com/package/num2fraction) \n[![NPM Version](http://img.shields.io/npm/v/num2fraction.svg?style=flat)](https://www.npmjs.com/package/num2fraction) \n[![License](https://img.shields.io/npm/l/num2fraction.svg?style=flat)](http://opensource.org/licenses/MIT) \n\n> Converting Number to Fraction with Node.js.\n\n## Installation\n\n```console\nnpm install num2fraction\n```\n\n## Usage\n\n```js\nvar π   = Math.PI\nvar n2f = require('num2fraction')\n  console.log(n2f(0))                // => 0\n  console.log(n2f(.2))               // => 1/5\n  console.log(n2f(1.1))              // => 11/10\n  console.log(n2f(1.2))              // => 6/5\n  console.log(n2f(1.3))              // => 13/10\n  console.log(n2f(1.4))              // => 7/5\n  console.log(n2f(1.5))              // => 3/2\n  console.log(n2f(2))                // => 2/1\n  console.log(n2f(2.1))              // => 21/10\n  console.log(n2f(3))                // => 3/1\n  console.log(n2f(2.555))            // => 511/200\n  console.log(n2f(8.36))             // => 209/25\n  console.log(n2f('3em'))            // => 3/1\n  console.log(n2f('1.5px'))          // => 3/2\n  console.log(n2f(7 / 9)             // => 7/9\n  console.log(n2f(8 / 9)             // => 8/9\n  console.log(n2f(512 / 999)         // => 512/999\n  console.log(n2f((2 * π / 3) / π)   // => 2/3\n  console.log(n2f((8 * 5) / (4 / 2)) // => 20/1\n```\n\n## Example\n\nOpera [old versions](http://www.opera.com/docs/specs/presto28/css/o-vendor/) support the non-standard `-o-min-device-pixel-ratio` or `-o-max-device-pixel-ratio` in CSS media queries.\n\n```css\n@media\n  only screen and (-webkit-min-device-pixel-ratio: 2),\n  only screen and (   min--moz-device-pixel-ratio: 2),\n  only screen and (     -o-min-device-pixel-ratio: 2/1), /* Opera */\n  only screen and (        min-device-pixel-ratio: 2),\n  only screen and (                min-resolution: 192dpi), /* fallback */\n  only screen and (                min-resolution: 2dppx) { \n\n}\n```\n\n## Changelog\n\n### v1.2.2\n\n* \\+ Remove: Debug log message.\n\n### v1.2.1\n\n* \\+ Fix: 0 must be converted to a string.\n\n### v1.2.0\n\n* \\+ Fix: Accomodate rounding errors. (by @jamestalmage)\n* \\+ Fix: The negative sign should be on numerator. (by @jamestalmage)\n\n### v1.1.0\n\n* \\+ Use more precise (not fixed) precision factor for the calculation\n\n### v1.0.1\n\n* \\- Remove \"ci.testling.com\"\n\n### V1.0.0\n\n> First release.\n\n## License\n\n[MIT](LICENSE)\n",
  "repository": {
    "type": "git",
    "url": "git+ssh://git@github.com/yisibl/num2fraction.git"
  },
  "users": {
    "karzanosman984": true
  },
  "bugs": {
    "url": "https://github.com/yisibl/num2fraction/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "num2fraction",
      "version": "1.0.0",
      "description": "Number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git@github.com:yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "testling": {
        "files": "test/*.js",
        "browsers": [
          "ie/6..latest",
          "firefox/15",
          "firefox/latest",
          "firefox/nightly",
          "chrome/15",
          "chrome/latest",
          "chrome/canary",
          "opera/12..latest",
          "opera/next",
          "safari/5.1..latest",
          "ipad/6.0..latest",
          "iphone/6.0..latest",
          "android-browser/4.2..latest"
        ]
      },
      "gitHead": "cfdb431532019d6a13f3b8685ab62c272141df3a",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction",
      "_id": "num2fraction@1.0.0",
      "_shasum": "c024714b8d70706e800527ea7071d7d0113959e3",
      "_from": ".",
      "_npmVersion": "2.1.11",
      "_nodeVersion": "0.10.32",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "c024714b8d70706e800527ea7071d7d0113959e3",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.0.0.tgz",
        "integrity": "sha512-BwqwW6giDRqpeMWZZySV4JU4psohuSEYl57vAhE3+w9yq1AiC3htyMhUhRyIwr3fQ9aai1ddhumfdZp8YDI5PQ==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIH3BOLuuXgP8TzFyc0wUBZ9fjDumg4vLWn00pFcMMRk+AiBAHveZz5cZh486d79Bca3ZNSxc2Xllfeg517oEprtj8g=="
          }
        ]
      },
      "directories": {}
    },
    "1.0.1": {
      "name": "num2fraction",
      "version": "1.0.1",
      "description": "Convert number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git@github.com:yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "gitHead": "8e094652157b0ed03a49156abe8e80c76b40daee",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction",
      "_id": "num2fraction@1.0.1",
      "_shasum": "addc0cad817e1a8686584a303ff244cbd336c531",
      "_from": ".",
      "_npmVersion": "2.1.11",
      "_nodeVersion": "0.10.32",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "addc0cad817e1a8686584a303ff244cbd336c531",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.0.1.tgz",
        "integrity": "sha512-gUhLEbMK/F/vVKAWh/d5TvI42oB4uwwZpzTdMLRCJOmJSVvo4anAdVxpduLlaPmyhH8yGaCt7bo1O9gdsU0TCw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIAFHqaZgMpPqeBG8Nrtc0jdhHAtyra1Qfe88LsMxhrSBAiEAwcWfk4hcZBMVXPjP92kbvu8BFmFIE+pikPvUXtGgPWM="
          }
        ]
      },
      "directories": {}
    },
    "1.1.0": {
      "name": "num2fraction",
      "version": "1.1.0",
      "description": "Convert number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git@github.com:yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "gitHead": "4d0408151429d831192d9d7694453592d1e70393",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction",
      "_id": "num2fraction@1.1.0",
      "_shasum": "1b53515b0a34ae81490a049a56f2a4a2a68dd393",
      "_from": ".",
      "_npmVersion": "2.1.11",
      "_nodeVersion": "0.10.32",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "1b53515b0a34ae81490a049a56f2a4a2a68dd393",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.1.0.tgz",
        "integrity": "sha512-xdb2PeSY7+yPt67MgXHQmK5BCMJr/v5yC90mPDlaGceMaPaS72N435F6dLFsRoiLjoJ/FPb7X6PbAU/DWvdaqw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIE+AUKF9DwoobKj12Eq6SfNiMFEmneleSpTZMKtlpK1LAiAMHuyZ50bibOul1nJXtSbduW8790GMmyp5E5sjnGobuQ=="
          }
        ]
      },
      "directories": {}
    },
    "1.2.0": {
      "name": "num2fraction",
      "version": "1.2.0",
      "description": "Convert number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+ssh://git@github.com/yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "gitHead": "d4d3219ad4be8459302e134e4a28e983437b3fd4",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction#readme",
      "_id": "num2fraction@1.2.0",
      "_shasum": "547d37e936a984abe0bd2fb5af6036cb667829c4",
      "_from": ".",
      "_npmVersion": "2.11.2",
      "_nodeVersion": "0.12.5",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "547d37e936a984abe0bd2fb5af6036cb667829c4",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.2.0.tgz",
        "integrity": "sha512-z+mr8InG8fqO0Is/ADuSvktg2+Nx8e2lhmL36PKt4t24LFCcVWAVBocCdTWPwS/WAqrFNWodIw0vVbQ9Pxy9dw==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEQCIEl+6VPPRboPByaEtvC3dU0sre1TGaBAamQH8pZ+Zm4NAiBefJu5DW2n3sio9DNGNdEe35n4FkK6NTLlpKhgCToNRw=="
          }
        ]
      },
      "directories": {}
    },
    "1.2.1": {
      "name": "num2fraction",
      "version": "1.2.1",
      "description": "Convert number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+ssh://git@github.com/yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "gitHead": "597b74cd877031b95f6f76393eaffb50f1d60e6d",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction#readme",
      "_id": "num2fraction@1.2.1",
      "_shasum": "eaa605915aeb9f5098647c1f0bc28125d77218b7",
      "_from": ".",
      "_npmVersion": "2.11.2",
      "_nodeVersion": "0.12.5",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "eaa605915aeb9f5098647c1f0bc28125d77218b7",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.2.1.tgz",
        "integrity": "sha512-N9sAXdVij4D2916E3UKkR7FfI/t/JlmNtLYa9JylOY8SnpXeYq+EfXKEi+QZVPH2fK0eoOQu3jYZw2fwqcPvWA==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIQC1fHvpjWxgQ73BdJHxUPi8kfLjFySyLq32wnlqKNA3qQIgWVNqSQjFnpHLbuwr5dzDY0K6dYADn+jm1BIAHV496og="
          }
        ]
      },
      "directories": {}
    },
    "1.2.2": {
      "name": "num2fraction",
      "version": "1.2.2",
      "description": "Convert number to fraction",
      "main": "index.js",
      "author": {
        "name": "yisi",
        "email": "yiorsi@gmail.com",
        "url": "http://iyunlu.com/view"
      },
      "license": "MIT",
      "repository": {
        "type": "git",
        "url": "git+ssh://git@github.com/yisibl/num2fraction.git"
      },
      "keywords": [
        "fraction",
        "number",
        "math",
        "maths",
        "arithmetic",
        "gcd",
        "rational"
      ],
      "devDependencies": {
        "tape": "^3.0.0"
      },
      "scripts": {
        "test": "tape test/*.js"
      },
      "gitHead": "df97795dd5a29466a4855794c1031ba869f0829c",
      "bugs": {
        "url": "https://github.com/yisibl/num2fraction/issues"
      },
      "homepage": "https://github.com/yisibl/num2fraction#readme",
      "_id": "num2fraction@1.2.2",
      "_shasum": "6f682b6a027a4e9ddfa4564cd2589d1d4e669ede",
      "_from": ".",
      "_npmVersion": "2.11.2",
      "_nodeVersion": "0.12.5",
      "_npmUser": {
        "name": "yisi",
        "email": "yiorsi@gmail.com"
      },
      "maintainers": [
        {
          "name": "yisi",
          "email": "yiorsi@gmail.com"
        }
      ],
      "dist": {
        "shasum": "6f682b6a027a4e9ddfa4564cd2589d1d4e669ede",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/num2fraction/-/num2fraction-1.2.2.tgz",
        "integrity": "sha512-Y1wZESM7VUThYY+4W+X4ySH2maqcA+p7UR+w8VWNWVAd6lwuXXWz/w/Cz43J/dI2I+PS6wD5N+bJUF+gjWvIqg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIAvngrrqVEZuw1tbhR9lOkPi+1ofro+x/7rI71dB5HzJAiEA36PY+T6Pa0b75tWeWSW+YxmpKTMXsTdr8Od5Y3PCgVA="
          }
        ]
      },
      "directories": {}
    }
  },
  "name": "num2fraction",
  "time": {
    "modified": "2026-05-24T07:56:45.081Z",
    "created": "2015-01-27T07:34:18.610Z",
    "1.0.0": "2015-01-27T07:34:18.610Z",
    "1.0.1": "2015-01-28T03:26:43.678Z",
    "1.1.0": "2015-04-19T13:02:09.419Z",
    "1.2.0": "2015-09-13T13:03:40.698Z",
    "1.2.1": "2015-09-13T13:38:04.366Z",
    "1.2.2": "2015-09-14T02:12:01.401Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/yisibl/num2fraction#readme"
}