{"_id":"math-abs","_rev":"6-16558241843d14f56c79512a6ec5282b","name":"math-abs","description":"Computes an absolute value.","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.0":{"name":"math-abs","version":"0.0.0","description":"Computes an absolute value.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/math-abs.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.abs","abs","absolute","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/math-abs/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","validate.io-negative-zero":"^1.0.0"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"de142ae5cf98debcb602fa2d82287a500a726786","homepage":"https://github.com/math-io/math-abs#readme","_id":"math-abs@0.0.0","_shasum":"98799771b1249b793481f5df9d83123c12558c6e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"98799771b1249b793481f5df9d83123c12558c6e","tarball":"https://registry.npmjs.org/math-abs/-/math-abs-0.0.0.tgz","integrity":"sha512-8ZKc/bRC0zd10w7RL2s2xTs7h7mPsEHxsnbhUd9Iu2xcmTqr9iBwPotQRR27MLmSuw4n2HZRbE4rT3MCmLoLvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb+HL8AcWbR6Z3Oafc1JZzQlRlEzRYG+qFP/QDxazjcgIhAO5hEK3joDtjyEqjuoLq4rleHZKGMZRGI7oYq62Cvx1U"}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.0":{"name":"math-abs","version":"1.0.0","description":"Computes an absolute value.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/math-abs.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.abs","abs","absolute","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/math-abs/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","validate.io-negative-zero":"^1.0.0"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"4ad680a356b41f217b3ffdd6a61803bc6913621d","homepage":"https://github.com/math-io/math-abs#readme","_id":"math-abs@1.0.0","_shasum":"efefab86427be95acd964deb05fa01828ef4ce8e","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"efefab86427be95acd964deb05fa01828ef4ce8e","tarball":"https://registry.npmjs.org/math-abs/-/math-abs-1.0.0.tgz","integrity":"sha512-I9yOvfgLB8v6yX2AWyQvB7A5AYpggmjejGjaGnwzyxUWaR5wqwdlIsWGXW3f6CR5Vs+V/epSAqqF8M5deKZIAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCr2a/4dbfp5FQEPDT+ba0HvIvTSnbB1RWethdPxRvlVAIgb5xoV0u1NvGHBake0ofJmgJKX1dVZOj/uRftB7fqv+M="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.1":{"name":"math-abs","version":"1.0.1","description":"Computes an absolute value.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/abs.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.abs","abs","absolute","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/abs/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","validate.io-negative-zero":"^1.0.0"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"5ed0fe9799ec2c5fdc927ab1946a5b821a0dee93","homepage":"https://github.com/math-io/abs#readme","_id":"math-abs@1.0.1","_shasum":"f20c6ccd4ea128b59dab4706c8019a7dfa04d03d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"f20c6ccd4ea128b59dab4706c8019a7dfa04d03d","tarball":"https://registry.npmjs.org/math-abs/-/math-abs-1.0.1.tgz","integrity":"sha512-Aku/Q/IqbnVOgWYUaUz61w++fptNOU0h1Jq6ih9WskFKOaPWiMY71yHKuQCAjjNGyInZCCHQqsB9oU79r5tAsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsHjUSeoewTbX1+DpzuLzmah9J2/NbY46E0jfxg31WTQIhAOzouCyAJ/ve+OJq58lNIiWxVSNCPAnkTr+o+sCiVAJB"}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.2":{"name":"math-abs","version":"1.0.2","description":"Computes an absolute value.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"if [ \"${TRAVIS}\" ]; then npm run test-ci; else npm run test-local; fi","test-local":"tape \"./test/*.js\" | tap-spec","test-ci":"npm run test-local && xvfb-run npm run test-browsers","test-cov":"istanbul cover --dir ./reports/coverage --report lcov tape -- \"./test/*.js\"","test-browsers":"browserify ./test/*.js | testling | tap-spec","coverage":"istanbul cover --dir ./reports/codecov/coverage --report lcovonly tape -- \"./test/*.js\" && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/math-io/abs.git"},"keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.abs","abs","absolute","value","scalar","number"],"bugs":{"url":"https://github.com/math-io/abs/issues"},"dependencies":{},"devDependencies":{"browserify":"12.x.x","codecov":"1.x.x","istanbul":"^0.4.1","jshint":"2.x.x","jshint-stylish":"2.x.x","tap-spec":"4.x.x","tape":"4.x.x","testling":"1.x.x","validate.io-negative-zero":"^1.0.0"},"testling":{"files":["test/*.js"],"browsers":["iexplore/6.0..latest","firefox/3.0..latest","firefox/nightly","chrome/4.0..latest","chrome/canary","opera/10.0..latest","opera/next","safari/4.0..latest","ipad/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]},"license":"MIT","gitHead":"5d00079b1c55f001c06b214b9a370578682fa24e","homepage":"https://github.com/math-io/abs#readme","_id":"math-abs@1.0.2","_shasum":"8fb2675d969327a61a629821fc23e41faac5c4d3","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"8fb2675d969327a61a629821fc23e41faac5c4d3","tarball":"https://registry.npmjs.org/math-abs/-/math-abs-1.0.2.tgz","integrity":"sha512-I+EJ+UWkByNqq2duZuj7h0p11SxBpZ7nw0vticgFgeUooB0SR9M+5KLARLeLxvvu/muCcx7qIBxGDE8rIIstfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSU+MzT0T5cG2f+LrPUNgN9ahUv4M5X4q5m3KT8kI0mAIgTp2L7zrcpD22NZbO+fNh75i5BmpMC8i7H+rU5pqY1cQ="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"Absolute Value\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Coverage Status][coverage-image]][coverage-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> Computes an [absolute value][absolute-value].\n\nThe [absolute value][absolute-value] is defined as\n\n<div class=\"equation\" align=\"center\" data-raw-text=\"|x| = \\begin{cases} x &amp; \\textrm{if}\\ x \\geq 0 \\\\ -x &amp; \\textrm{if}\\ x < 0\\end{cases}\" data-equation=\"eq:absolute_value\">\n\t<img src=\"https://cdn.rawgit.com/math-io/abs/ea1d4096f7300f593d29705b025c1f7bf47da1b5/docs/img/eqn.svg\" alt=\"Absolute value definition.\">\n\t<br>\n</div>\n\n\n## Installation\n\n``` bash\n$ npm install math-abs\n```\n\n\n## Usage\n\n``` javascript\nvar abs = require( 'math-abs' );\n```\n\n#### abs( x )\n\nComputes an [absolute value][absolute-value].\n\n``` javascript\nvar val = abs( -1 );\n// returns 1\n\nval = abs( 2 );\n// returns 2\n\nval = abs( 0 );\n// returns 0\n\nval = abs( -0 );\n// returns 0\n```\n\n\n## Examples\n\n``` javascript\nvar abs = require( 'math-abs' );\n\nvar rand;\nvar sign;\nvar i;\nfor ( i = 0; i < 100; i++ ) {\n\trand = Math.round( Math.random() * 100 ) - 50;\n\tsign = Math.random();\n\tif ( sign < 0.5 ) {\n\t\tsign = -1;\n\t} else {\n\t\tsign = 1;\n\t}\n\tconsole.log( 'Before: %d. After: %d.', rand, abs( rand ) );\n}\n```\n\nTo run the example code from the top-level application directory,\n\n``` bash\n$ node ./examples/index.js\n```\n\n\n---\n## Tests\n\n### Unit\n\nThis repository uses [tape][tape] for unit tests. To run the tests, execute the following command in the top-level application directory:\n\n``` bash\n$ make test\n```\n\nAll new feature development should have corresponding unit tests to validate correct functionality.\n\n\n### Test Coverage\n\nThis repository uses [Istanbul][istanbul] as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-cov\n```\n\nIstanbul creates a `./reports/coverage` directory. To access an HTML version of the report,\n\n``` bash\n$ make view-cov\n```\n\n\n### Browser Support\n\nThis repository uses [Testling][testling] for browser testing. To run the tests in a (headless) local web browser, execute the following command in the top-level application directory:\n\n``` bash\n$ make test-browsers\n```\n\nTo view the tests in a local web browser,\n\n``` bash\n$ make view-browser-tests\n```\n\n<!-- [![browser support][browsers-image]][browsers-url] -->\n\n\n---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright &copy; 2016. The [Compute.io][compute-io] Authors.\n\n\n[npm-image]: http://img.shields.io/npm/v/math-abs.svg\n[npm-url]: https://npmjs.org/package/math-abs\n\n[build-image]: http://img.shields.io/travis/math-io/abs/master.svg\n[build-url]: https://travis-ci.org/math-io/abs\n\n[coverage-image]: https://img.shields.io/codecov/c/github/math-io/abs/master.svg\n[coverage-url]: https://codecov.io/github/math-io/abs?branch=master\n\n[dependencies-image]: http://img.shields.io/david/math-io/abs.svg\n[dependencies-url]: https://david-dm.org/math-io/abs\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/math-io/abs.svg\n[dev-dependencies-url]: https://david-dm.org/dev/math-io/abs\n\n[github-issues-image]: http://img.shields.io/github/issues/math-io/abs.svg\n[github-issues-url]: https://github.com/math-io/abs/issues\n\n[tape]: https://github.com/substack/tape\n[istanbul]: https://github.com/gotwarlost/istanbul\n[testling]: https://ci.testling.com\n\n[compute-io]: https://github.com/compute-io/\n[absolute-value]: https://en.wikipedia.org/wiki/Absolute_value\n","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-19T16:37:45.316Z","created":"2016-01-08T04:59:50.829Z","0.0.0":"2016-01-08T04:59:50.829Z","1.0.0":"2016-01-08T05:00:21.730Z","1.0.1":"2016-01-08T13:33:24.617Z","1.0.2":"2016-01-10T11:21:24.377Z"},"homepage":"https://github.com/math-io/abs#readme","keywords":["compute.io","compute-io","compute","computation","math.io","math-io","math","mathematics","math.abs","abs","absolute","value","scalar","number"],"repository":{"type":"git","url":"git://github.com/math-io/abs.git"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"bugs":{"url":"https://github.com/math-io/abs/issues"},"license":"MIT","readmeFilename":"README.md"}