{
	"name": "normalize-range",
	"versions": {
		"0.1.0": {
			"name": "normalize-range",
			"version": "0.1.0",
			"description": "My dazzling module",
			"license": "MIT",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/jamestalmage/normalize-range.git"
			},
			"author": {
				"name": "James Talmage",
				"email": "james@talmage.io",
				"url": "github.com/jamestalmage"
			},
			"engines": {
				"node": ">=0.10.0"
			},
			"scripts": {
				"test": "npm run cover && npm run lint && npm run style",
				"cover": "istanbul cover ./node_modules/.bin/_mocha",
				"lint": "jshint --reporter=node_modules/jshint-stylish *.js test/*.js",
				"debug": "mocha",
				"watch": "mocha -w",
				"style": "jscs *.js ./**/*.js && jscs ./test/** --config=./test/.jscsrc"
			},
			"files": [
				"index.js"
			],
			"keywords": [],
			"dependencies": {},
			"devDependencies": {
				"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"
			},
			"gitHead": "4087f4ced3dd2aca0408dc38b8dc5348b46b52a1",
			"bugs": {
				"url": "https://github.com/jamestalmage/normalize-range/issues"
			},
			"homepage": "https://github.com/jamestalmage/normalize-range#readme",
			"_id": "normalize-range@0.1.0",
			"_shasum": "7dc10354319857a4bc115926c2c0b46584963102",
			"_from": ".",
			"_npmVersion": "2.14.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "james.talmage",
				"email": "james@talmage.io"
			},
			"dist": {
				"shasum": "7dc10354319857a4bc115926c2c0b46584963102",
				"tarball": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.0.tgz"
			},
			"maintainers": [
				{
					"name": "james.talmage",
					"email": "james@talmage.io"
				}
			],
			"directories": {},
			"contributors": []
		},
		"0.1.1": {
			"name": "normalize-range",
			"version": "0.1.1",
			"description": "Utility for normalizing a numeric range, with a wrapping function useful for polar coordinates",
			"license": "MIT",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/jamestalmage/normalize-range.git"
			},
			"author": {
				"name": "James Talmage",
				"email": "james@talmage.io",
				"url": "github.com/jamestalmage"
			},
			"engines": {
				"node": ">=0.10.0"
			},
			"scripts": {
				"test": "npm run cover && npm run lint && npm run style",
				"cover": "istanbul cover ./node_modules/.bin/_mocha",
				"lint": "jshint --reporter=node_modules/jshint-stylish *.js test/*.js",
				"debug": "mocha",
				"watch": "mocha -w",
				"style": "jscs *.js ./**/*.js && jscs ./test/** --config=./test/.jscsrc"
			},
			"files": [
				"index.js"
			],
			"keywords": [
				"range",
				"normalize",
				"utility",
				"angle",
				"degrees",
				"polar"
			],
			"dependencies": {},
			"devDependencies": {
				"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"
			},
			"gitHead": "1a09c330c6d4d45003c4324d10ab5a2784e1206e",
			"bugs": {
				"url": "https://github.com/jamestalmage/normalize-range/issues"
			},
			"homepage": "https://github.com/jamestalmage/normalize-range#readme",
			"_id": "normalize-range@0.1.1",
			"_shasum": "a40ffccb98fe9d3a2ebb52014b0ef42973fe0209",
			"_from": ".",
			"_npmVersion": "2.14.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "james.talmage",
				"email": "james@talmage.io"
			},
			"dist": {
				"shasum": "a40ffccb98fe9d3a2ebb52014b0ef42973fe0209",
				"tarball": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.1.tgz"
			},
			"maintainers": [
				{
					"name": "james.talmage",
					"email": "james@talmage.io"
				}
			],
			"directories": {},
			"contributors": []
		},
		"0.1.2": {
			"name": "normalize-range",
			"version": "0.1.2",
			"description": "Utility for normalizing a numeric range, with a wrapping function useful for polar coordinates",
			"license": "MIT",
			"repository": {
				"type": "git",
				"url": "git+https://github.com/jamestalmage/normalize-range.git"
			},
			"author": {
				"name": "James Talmage",
				"email": "james@talmage.io",
				"url": "github.com/jamestalmage"
			},
			"engines": {
				"node": ">=0.10.0"
			},
			"scripts": {
				"test": "npm run cover && npm run lint && npm run style",
				"cover": "istanbul cover ./node_modules/.bin/_mocha",
				"lint": "jshint --reporter=node_modules/jshint-stylish *.js test/*.js",
				"debug": "mocha",
				"watch": "mocha -w",
				"style": "jscs *.js ./**/*.js && jscs ./test/** --config=./test/.jscsrc"
			},
			"files": [
				"index.js"
			],
			"keywords": [
				"range",
				"normalize",
				"utility",
				"angle",
				"degrees",
				"polar"
			],
			"dependencies": {},
			"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"
			},
			"gitHead": "4add1b491840c17c80cd0ca8145505d663955861",
			"bugs": {
				"url": "https://github.com/jamestalmage/normalize-range/issues"
			},
			"homepage": "https://github.com/jamestalmage/normalize-range#readme",
			"_id": "normalize-range@0.1.2",
			"_shasum": "2d10c06bdfd312ea9777695a4d28439456b75942",
			"_from": ".",
			"_npmVersion": "2.14.2",
			"_nodeVersion": "0.12.7",
			"_npmUser": {
				"name": "james.talmage",
				"email": "james@talmage.io"
			},
			"dist": {
				"shasum": "2d10c06bdfd312ea9777695a4d28439456b75942",
				"tarball": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz"
			},
			"maintainers": [
				{
					"name": "james.talmage",
					"email": "james@talmage.io"
				}
			],
			"directories": {},
			"contributors": []
		}
	},
	"time": {
		"modified": "2015-11-24T00:20:49.772Z",
		"created": "2015-09-12T06:18:30.740Z",
		"0.1.0": "2015-09-12T06:18:30.740Z",
		"0.1.1": "2015-09-12T06:27:02.731Z",
		"0.1.2": "2015-09-13T05:20:04.639Z"
	},
	"users": {},
	"dist-tags": {
		"latest": "0.1.2"
	},
	"_uplinks": {
		"npmjs": {
			"etag": "W/\"c3a15e353dc95f29f01c259f8cfdfa65\"",
			"fetched": 1600679307487
		}
	},
	"_distfiles": {
		"normalize-range-0.1.0.tgz": {
			"url": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.0.tgz",
			"sha": "7dc10354319857a4bc115926c2c0b46584963102",
			"registry": "npmjs"
		},
		"normalize-range-0.1.1.tgz": {
			"url": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.1.tgz",
			"sha": "a40ffccb98fe9d3a2ebb52014b0ef42973fe0209",
			"registry": "npmjs"
		},
		"normalize-range-0.1.2.tgz": {
			"url": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
			"sha": "2d10c06bdfd312ea9777695a4d28439456b75942",
			"registry": "npmjs"
		}
	},
	"_attachments": {
		"normalize-range-0.1.2.tgz": {
			"shasum": "2d10c06bdfd312ea9777695a4d28439456b75942"
		}
	},
	"_rev": "2-507a5cee59dfd176",
	"_id": "normalize-range",
	"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)"
}