{
  "_args": [
    [
      {
        "raw": "normalize-range@^0.1.2",
        "scope": null,
        "escapedName": "normalize-range",
        "name": "normalize-range",
        "rawSpec": "^0.1.2",
        "spec": ">=0.1.2 <0.2.0",
        "type": "range"
      },
      "/Users/sindresorhus/dev/sublime-autoprefixer/node_modules/autoprefixer"
    ]
  ],
  "_from": "normalize-range@>=0.1.2 <0.2.0",
  "_id": "normalize-range@0.1.2",
  "_inCache": true,
  "_location": "/normalize-range",
  "_nodeVersion": "0.12.7",
  "_npmUser": {
    "name": "james.talmage",
    "email": "james@talmage.io"
  },
  "_npmVersion": "2.14.2",
  "_phantomChildren": {},
  "_requested": {
    "raw": "normalize-range@^0.1.2",
    "scope": null,
    "escapedName": "normalize-range",
    "name": "normalize-range",
    "rawSpec": "^0.1.2",
    "spec": ">=0.1.2 <0.2.0",
    "type": "range"
  },
  "_requiredBy": [
    "/autoprefixer"
  ],
  "_resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
  "_shasum": "2d10c06bdfd312ea9777695a4d28439456b75942",
  "_shrinkwrap": null,
  "_spec": "normalize-range@^0.1.2",
  "_where": "/Users/sindresorhus/dev/sublime-autoprefixer/node_modules/autoprefixer",
  "author": {
    "name": "James Talmage",
    "email": "james@talmage.io",
    "url": "github.com/jamestalmage"
  },
  "bugs": {
    "url": "https://github.com/jamestalmage/normalize-range/issues"
  },
  "dependencies": {},
  "description": "Utility for normalizing a numeric range, with a wrapping function useful for polar coordinates",
  "devDependencies": {
    "almost-equal": "^1.0.0",
    "codeclimate-test-reporter": "^0.1.0",
    "coveralls": "^2.11.2",
    "istanbul": "^0.3.17",
    "jscs": "^2.1.1",
    "jshint": "^2.8.0",
    "jshint-stylish": "^2.0.1",
    "mocha": "^2.2.5",
    "stringify-pi": "0.0.3"
  },
  "directories": {},
  "dist": {
    "shasum": "2d10c06bdfd312ea9777695a4d28439456b75942",
    "tarball": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz"
  },
  "engines": {
    "node": ">=0.10.0"
  },
  "files": [
    "index.js"
  ],
  "gitHead": "4add1b491840c17c80cd0ca8145505d663955861",
  "homepage": "https://github.com/jamestalmage/normalize-range#readme",
  "keywords": [
    "range",
    "normalize",
    "utility",
    "angle",
    "degrees",
    "polar"
  ],
  "license": "MIT",
  "maintainers": [
    {
      "name": "james.talmage",
      "email": "james@talmage.io"
    }
  ],
  "name": "normalize-range",
  "optionalDependencies": {},
  "readme": "# normalize-range \n\nUtility for normalizing a numeric range, with a wrapping function useful for polar coordinates.\n\n[![Build Status](https://travis-ci.org/jamestalmage/normalize-range.svg?branch=master)](https://travis-ci.org/jamestalmage/normalize-range)\n[![Coverage Status](https://coveralls.io/repos/jamestalmage/normalize-range/badge.svg?branch=master&service=github)](https://coveralls.io/github/jamestalmage/normalize-range?branch=master)\n[![Code Climate](https://codeclimate.com/github/jamestalmage/normalize-range/badges/gpa.svg)](https://codeclimate.com/github/jamestalmage/normalize-range)\n[![Dependency Status](https://david-dm.org/jamestalmage/normalize-range.svg)](https://david-dm.org/jamestalmage/normalize-range)\n[![devDependency Status](https://david-dm.org/jamestalmage/normalize-range/dev-status.svg)](https://david-dm.org/jamestalmage/normalize-range#info=devDependencies)\n\n[![NPM](https://nodei.co/npm/normalize-range.png)](https://nodei.co/npm/normalize-range/)\n\n## Usage\n\n```js\nvar nr = require('normalize-range');\n\nnr.wrap(0, 360, 400);\n//=> 40\n\nnr.wrap(0, 360, -90);\n//=> 270\n\nnr.limit(0, 100, 500);\n//=> 100\n\nnr.limit(0, 100, -20);\n//=> 0\n\n// There is a convenient currying function\nvar wrapAngle = nr.curry(0, 360).wrap;\nvar limitTo10 = nr.curry(0, 10).limit;\n\nwrapAngle(-30);\n//=> 330\n```\n## API\n\n### wrap(min, max, value)\n\nNormalizes a values that \"wraps around\". For example, in a polar coordinate system, 270˚ can also be\nrepresented as -90˚. \nFor wrapping purposes we assume `max` is functionally equivalent to `min`, and that `wrap(max + 1) === wrap(min + 1)`.\nWrap always assumes that `min` is *inclusive*, and `max` is *exclusive*.\nIn other words, if `value === max` the function will wrap it, and return `min`, but `min` will not be wrapped.\n\n```js\nnr.wrap(0, 360, 0) === 0;\nnr.wrap(0, 360, 360) === 0;\nnr.wrap(0, 360, 361) === 1;\nnr.wrap(0, 360, -1) === 359;\n```\n\nYou are not restricted to whole numbers, and ranges can be negative.\n\n```js\nvar π = Math.PI;\nvar radianRange = nr.curry(-π, π);\n\nredianRange.wrap(0) === 0;\nnr.wrap(π) === -π;\nnr.wrap(4 * π / 3) === -2 * π / 3;\n```\n\n### limit(min, max, value)\n\nNormalize the value by bringing it within the range.\nIf `value` is greater than `max`, `max` will be returned.\nIf `value` is less than `min`, `min` will be returned.\nOtherwise, `value` is returned unaltered.\nBoth ends of this range are *inclusive*.\n\n### test(min, max, value, [minExclusive], [maxExclusive])\n\nReturns `true` if `value` is within the range, `false` otherwise.\nIt defaults to `inclusive` on both ends of the range, but that can be\nchanged by setting `minExclusive` and/or `maxExclusive` to a truthy value.\n\n### validate(min, max, value, [minExclusive], [maxExclusive])\n\nReturns `value` or throws an error if `value` is outside the specified range.\n\n### name(min, max, value, [minExclusive], [maxExclusive])\n\nReturns a string representing this range in \n[range notation](https://en.wikipedia.org/wiki/Interval_(mathematics)#Classification_of_intervals).\n\n### curry(min, max, [minExclusive], [maxExclusive])\n\nConvenience method for currying all method arguments except `value`.\n\n```js\nvar angle = require('normalize-range').curry(-180, 180, false, true);\n\nangle.wrap(270)\n//=> -90\n\nangle.limit(200)\n//=> 180\n\nangle.test(0)\n//=> true\n\nangle.validate(300)\n//=> throws an Error\n\nangle.toString() // or angle.name()\n//=> \"[-180,180)\"\n```\n\n#### min\n\n*Required*  \nType: `number`\n\nThe minimum value (inclusive) of the range.\n\n#### max\n\n*Required*  \nType: `number`\n\nThe maximum value (exclusive) of the range.\n\n#### value\n\n*Required*  \nType: `number`\n\nThe value to be normalized.\n\n#### returns\n\nType: `number`\n\nThe normalized value.\n\n## Building and Releasing\n\n- `npm test`: tests, linting, coverage and style checks.\n- `npm run watch`: autotest mode for active development.\n- `npm run debug`: run tests without coverage (istanbul can obscure line #'s) \n\nRelease via `cut-release` tool.\n\n## License\n\nMIT © [James Talmage](http://github.com/jamestalmage)\n",
  "readmeFilename": "readme.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/jamestalmage/normalize-range.git"
  },
  "scripts": {
    "cover": "istanbul cover ./node_modules/.bin/_mocha",
    "debug": "mocha",
    "lint": "jshint --reporter=node_modules/jshint-stylish *.js test/*.js",
    "style": "jscs *.js ./**/*.js && jscs ./test/** --config=./test/.jscsrc",
    "test": "npm run cover && npm run lint && npm run style",
    "watch": "mocha -w"
  },
  "version": "0.1.2"
}
