{
  "_id": "parse-unit",
  "maintainers": [
    {
      "name": "mattdesl",
      "email": "dave.des@gmail.com"
    }
  ],
  "keywords": [
    "parse",
    "number",
    "string",
    "str",
    "split",
    "unit",
    "in",
    "m",
    "px",
    "%",
    "pt",
    "pc",
    "em",
    "deg",
    "rad",
    "css",
    "value"
  ],
  "dist-tags": {
    "latest": "1.0.1"
  },
  "author": {
    "name": "Matt DesLauriers",
    "email": "dave.des@gmail.com"
  },
  "_rev": "6-b3ac84901cc96ca303423e803a3341a2",
  "description": "parses number and unit, '20px' into [20, 'px']",
  "readme": "# parse-unit\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nParses a number and unit string, eg `\"20px\"` into `[20, \"px\"]`. \n\n```js\nvar unit = require('parse-unit')\n\n//prints [50, \"gold\"]\nconsole.log( unit(\"50 gold\") ) \n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/parse-unit.png)](https://nodei.co/npm/parse-unit/)\n\n#### `parse(str[, out])`\n\nParses the string and its unit, returning an array containing the number and unit, separated. \n\n```\n\"-20 foo\" => [-20, \"foo\"]\n\"5.5%\" => [5.5, \"%\"]\n5 => [5, \"\"]\n\"5\" => [5, \"\"]\n```\n\nThis will create a new array unless you specify an array to `out`, which allows you to re-use arrays. \n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/parse-unit/blob/master/LICENSE.md) for details.\n",
  "repository": {
    "type": "git",
    "url": "git://github.com/mattdesl/parse-unit.git"
  },
  "bugs": {
    "url": "https://github.com/mattdesl/parse-unit/issues"
  },
  "license": "MIT",
  "versions": {
    "1.0.0": {
      "name": "parse-unit",
      "version": "1.0.0",
      "description": "parses number and unit, '20px' into [20, 'px']",
      "main": "index.js",
      "license": "MIT",
      "author": {
        "name": "Matt DesLauriers",
        "email": "dave.des@gmail.com"
      },
      "dependencies": {},
      "devDependencies": {
        "tape": "~2.13.2"
      },
      "scripts": {
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/mattdesl/parse-unit.git"
      },
      "keywords": [
        "parse",
        "number",
        "string",
        "str",
        "split",
        "unit",
        "in",
        "m",
        "px",
        "%",
        "pt",
        "pc",
        "em",
        "deg",
        "rad",
        "css",
        "value"
      ],
      "homepage": "https://github.com/mattdesl/parse-unit",
      "bugs": {
        "url": "https://github.com/mattdesl/parse-unit/issues"
      },
      "gitHead": "80b99a203283ddce360c5ff91f6d87352c21302d",
      "_id": "parse-unit@1.0.0",
      "_shasum": "5dd92fe47caf63542633214b287a72e96d45efab",
      "_from": ".",
      "_npmVersion": "1.4.14",
      "_npmUser": {
        "name": "mattdesl",
        "email": "dave.des@gmail.com"
      },
      "maintainers": [
        {
          "name": "mattdesl",
          "email": "dave.des@gmail.com"
        }
      ],
      "dist": {
        "shasum": "5dd92fe47caf63542633214b287a72e96d45efab",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/parse-unit/-/parse-unit-1.0.0.tgz",
        "integrity": "sha512-E3IOG2J76Skmbhz+U3q954Psc2kHAp4yuuycTTbCXAgfgSZ486zerd5aYeUcEx1y6gCG/zA20gVo3S1RjYdF0g==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEUCIHTdG5Vb2NyVVdzf9fxKZSY/VAZIFDLkm5kGQne3JEWsAiEAsAxRIkAdXlIKrNrNl97R5thH4ehIe0U1exlodGuk1K8="
          }
        ]
      }
    },
    "1.0.1": {
      "name": "parse-unit",
      "version": "1.0.1",
      "description": "parses number and unit, '20px' into [20, 'px']",
      "main": "index.js",
      "license": "MIT",
      "author": {
        "name": "Matt DesLauriers",
        "email": "dave.des@gmail.com"
      },
      "dependencies": {},
      "devDependencies": {
        "tape": "~2.13.2"
      },
      "scripts": {
        "test": "node test.js"
      },
      "repository": {
        "type": "git",
        "url": "git://github.com/mattdesl/parse-unit.git"
      },
      "keywords": [
        "parse",
        "number",
        "string",
        "str",
        "split",
        "unit",
        "in",
        "m",
        "px",
        "%",
        "pt",
        "pc",
        "em",
        "deg",
        "rad",
        "css",
        "value"
      ],
      "homepage": "https://github.com/mattdesl/parse-unit",
      "bugs": {
        "url": "https://github.com/mattdesl/parse-unit/issues"
      },
      "gitHead": "d6e30cd1e8d6c01c6fce70a924789398aa277bfc",
      "_id": "parse-unit@1.0.1",
      "_shasum": "7e1bb6d5bef3874c28e392526a2541170291eecf",
      "_from": ".",
      "_npmVersion": "1.4.14",
      "_npmUser": {
        "name": "mattdesl",
        "email": "dave.des@gmail.com"
      },
      "maintainers": [
        {
          "name": "mattdesl",
          "email": "dave.des@gmail.com"
        }
      ],
      "dist": {
        "shasum": "7e1bb6d5bef3874c28e392526a2541170291eecf",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/parse-unit/-/parse-unit-1.0.1.tgz",
        "integrity": "sha512-hrqldJHokR3Qj88EIlV/kAyAi/G5R2+R56TBANxNMy0uPlYcttx0jnMW6Yx5KsKPSbC3KddM/7qQm3+0wEXKxg==",
        "signatures": [
          {
            "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
            "sig": "MEYCIQCogKu1Cvks3TPeork8KzET/bFvI5Nde4+4Lr0J3ERKvgIhANtn4L8CXPakxatZxnOOCMxVqATwDgJ2OBRGn+Qey8pY"
          }
        ]
      }
    }
  },
  "name": "parse-unit",
  "time": {
    "modified": "2026-05-23T12:36:10.526Z",
    "created": "2014-09-22T07:00:37.848Z",
    "1.0.0": "2014-09-22T07:00:37.848Z",
    "1.0.1": "2014-09-22T07:02:25.932Z"
  },
  "readmeFilename": "README.md",
  "homepage": "https://github.com/mattdesl/parse-unit"
}