{"_id":"compute-array-constructors","_rev":"5-8275b45063e8159b1972ad280e803551","name":"compute-array-constructors","description":"Returns an array constructor corresponding to an array data type.","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.0":{"name":"compute-array-constructors","version":"0.0.0","description":"Returns an array constructor corresponding to an array data type.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/compute-io/array-constructors.git"},"keywords":["compute.io","compute","computation","constructor","typed-array","typed","array","ctor","dtype","data","type","util","utils","utility","utilities"],"bugs":{"url":"https://github.com/compute-io/array-constructors/issues"},"dependencies":{},"devDependencies":{"chai":"2.x.x","mocha":"2.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"license":"MIT","gitHead":"fdd88275239a4eecc850329694f44e3f563f18bb","homepage":"https://github.com/compute-io/array-constructors#readme","_id":"compute-array-constructors@0.0.0","_shasum":"a90235e2fe4021bed8b0a3b1b266824b3db11a04","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.29","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"a90235e2fe4021bed8b0a3b1b266824b3db11a04","tarball":"https://registry.npmjs.org/compute-array-constructors/-/compute-array-constructors-0.0.0.tgz","integrity":"sha512-rH5wIA8VjUjKTmJBCfRAMDcazWPFBJxyZQ8G2mI6FRxE2RjKjTl6CD/dTQiGceLn0V0FcQ0R+GL6rc+jMKrYBQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmKlwUGo+G5dMC6uaImHfx5ob33fGo2djJpnJj/L8IFAiEA3YVRTjhjEsqmuEsFiT09FcRBb6VwWgVm3blsd/M1cxc="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.0":{"name":"compute-array-constructors","version":"1.0.0","description":"Returns an array constructor corresponding to an array data type.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","coveralls":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coveralls/coverage --report lcovonly -- -R spec && cat ./reports/coveralls/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./reports/coveralls"},"main":"./lib","repository":{"type":"git","url":"git://github.com/compute-io/array-constructors.git"},"keywords":["compute.io","compute","computation","constructor","typed-array","typed","array","ctor","dtype","data","type","util","utils","utility","utilities"],"bugs":{"url":"https://github.com/compute-io/array-constructors/issues"},"dependencies":{},"devDependencies":{"chai":"2.x.x","mocha":"2.x.x","coveralls":"^2.11.1","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"^1.0.0"},"license":"MIT","gitHead":"a6b692eff8875010bc8b28216f05cecb8c84c933","homepage":"https://github.com/compute-io/array-constructors#readme","_id":"compute-array-constructors@1.0.0","_shasum":"df702e8bb42df348a70cf7fe349b55c2f441f43d","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.10.29","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"df702e8bb42df348a70cf7fe349b55c2f441f43d","tarball":"https://registry.npmjs.org/compute-array-constructors/-/compute-array-constructors-1.0.0.tgz","integrity":"sha512-Cq8RJYxJa/39Ik1efb3Ar+dhciXR13Qd87Ieq7fMZK94iSQxAkVtiIOlV8K1FgbvOtG9vKj5lR83tCTwMPy+Iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD48MKV6+pCSFLM5I8JR/fXZQ67hcq4pjPcra5C3pthyAIhAKiDwNEQiRLnDQVCHSUwUPOFsfaSybUBf0yTNUNM9auk"}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.1":{"name":"compute-array-constructors","version":"1.0.1","description":"Returns an array constructor corresponding to an array data type.","author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"scripts":{"test":"mocha","test-cov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/coverage -- -R spec","codecov":"istanbul cover ./node_modules/.bin/_mocha --dir ./reports/codecov/coverage --report lcovonly -- -R spec && cat ./reports/codecov/coverage/lcov.info | codecov && rm -rf ./reports/codecov"},"main":"./lib","repository":{"type":"git","url":"git://github.com/dstructs/array-constructors.git"},"keywords":["compute.io","compute","computation","dstructs","constructor","typed-array","typed","array","ctor","dtype","data","type","util","utils","utility","utilities"],"bugs":{"url":"https://github.com/dstructs/array-constructors/issues"},"dependencies":{},"devDependencies":{"chai":"3.x.x","mocha":"2.x.x","codecov.io":"^0.1.5","istanbul":"^0.3.0","jshint":"2.x.x","jshint-stylish":"2.x.x"},"license":"MIT","gitHead":"e2068251f790f6806a165f9bfe28b1df78c3951e","homepage":"https://github.com/dstructs/array-constructors#readme","_id":"compute-array-constructors@1.0.1","_shasum":"87ed7a659668f32bf470ce21c9bb224964892665","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"87ed7a659668f32bf470ce21c9bb224964892665","tarball":"https://registry.npmjs.org/compute-array-constructors/-/compute-array-constructors-1.0.1.tgz","integrity":"sha512-DQXu1oIJLTJmk5a6EEkj9hbCsxzmNWFXXWbI6pOtJfoIMLajUD6KtShIH4g9T4vywkwt4YAbRlDzJhMmj7dJwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIARwOOVVffeHEeyHUC3cPOpnlOMx8PwNFbdbQM7aGBQ/AiEAxcZldBJGghXL4UsKuO3H3pBtVio5tmYHGMRP6P0aghU="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"Array Constructors\n===\n[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependencies][dependencies-image]][dependencies-url]\n\n> Returns an array constructor corresponding to an array data type.\n\n\n## Installation\n\n``` bash\n$ npm install compute-array-constructors\n```\n\nFor use in the browser, use [browserify](https://github.com/substack/node-browserify).\n\n\n## Usage\n\n``` javascript\nvar getCtor = require( 'compute-array-constructors' );\n```\n\n#### getCtor( dtype )\n\nReturns an `array` constructor corresponding to an `array` data type.\n\n``` javascript\nvar ctor = getCtor( 'int8' );\n// returns Int8Array\n```\n\nThe following `array` data types are supported:\n\n| Data Type | Constructor |\n|:----------|:------------|\n| int8 | [`Int8Array`][Int8Array] |\n| uint8 | [`Uint8Array`][Uint8Array] |\n| uint8_clamped | [`Uint8ClampedArray`][Uint8ClampedArray] |\n| int16 | [`Int16Array`][Int16Array] |\n| uint16 | [`Uint16Array`][Uint16Array] |\n| int32 | [`Int32Array`][Int32Array] |\n| uint32 | [`Uint32Array`][Uint32Array] |\n| float32 | [`Float32Array`][Float32Array] |\n| float64 | [`Float64Array`][Float64Array] |\n| generic | [`Array`][Array] |\n\n\n## Examples\n\n``` javascript\nvar getCtor = require( 'compute-array-constructors' );\n\nconsole.log( getCtor( 'int8' ) );\n// returns Int8Array\n\nconsole.log( getCtor( 'uint8' ) );\n// returns Uint8Array\n\nconsole.log( getCtor( 'uint8_clamped' ) );\n// returns Uint8ClampedArray\n\nconsole.log( getCtor( 'int16' ) );\n// returns Int16Array\n\nconsole.log( getCtor( 'uint16' ) );\n// returns Uint16Array\n\nconsole.log( getCtor( 'int32' ) );\n// returns Int32Array\n\nconsole.log( getCtor( 'uint32' ) );\n// returns Uint32Array\n\nconsole.log( getCtor( 'float32' ) );\n// returns Float32Array\n\nconsole.log( getCtor( 'float64' ) );\n// returns Float64Array\n\nconsole.log( getCtor( 'generic' ) );\n// returns Array\n\nconsole.log( getCtor( null ) );\n// returns null\n\nconsole.log( getCtor( 'object' ) );\n// returns null\n\nconsole.log( getCtor( 'array' ) );\n// returns null\n\nconsole.log( getCtor( {} ) );\n// returns null\n\nconsole.log( getCtor( [] ) );\n// returns null\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## Tests\n\n### Unit\n\nUnit tests use the [Mocha][mocha] test framework with [Chai][chai] assertions. 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---\n## License\n\n[MIT license](http://opensource.org/licenses/MIT).\n\n\n## Copyright\n\nCopyright &copy; 2015. The Compute.io Authors.\n\n\n[npm-image]: http://img.shields.io/npm/v/compute-array-constructors.svg\n[npm-url]: https://npmjs.org/package/compute-array-constructors\n\n[travis-image]: http://img.shields.io/travis/dstructs/array-constructors/master.svg\n[travis-url]: https://travis-ci.org/dstructs/array-constructors\n\n[codecov-image]: https://img.shields.io/codecov/c/github/dstructs/array-constructors/master.svg\n[codecov-url]: https://codecov.io/github/dstructs/array-constructors?branch=master\n\n[dependencies-image]: http://img.shields.io/david/dstructs/array-constructors.svg\n[dependencies-url]: https://david-dm.org/dstructs/array-constructors\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/dstructs/array-constructors.svg\n[dev-dependencies-url]: https://david-dm.org/dev/dstructs/array-constructors\n\n[github-issues-image]: http://img.shields.io/github/issues/dstructs/array-constructors.svg\n[github-issues-url]: https://github.com/dstructs/array-constructors/issues\n\n[mocha]: http://mochajs.org/\n[chai]: http://chaijs.com\n[istanbul]: https://github.com/gotwarlost/istanbul\n\n[Int8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n[Uint8Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n[Uint8ClampedArray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n[Int16Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n[Uint16Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n[Int32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n[Uint32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n[Float32Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n[Float64Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n\n\n","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-13T20:26:10.254Z","created":"2015-06-03T04:29:21.210Z","0.0.0":"2015-06-03T04:29:21.210Z","1.0.0":"2015-06-03T04:30:37.205Z","1.0.1":"2015-11-27T06:10:50.091Z"},"homepage":"https://github.com/dstructs/array-constructors#readme","keywords":["compute.io","compute","computation","dstructs","constructor","typed-array","typed","array","ctor","dtype","data","type","util","utils","utility","utilities"],"repository":{"type":"git","url":"git://github.com/dstructs/array-constructors.git"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"bugs":{"url":"https://github.com/dstructs/array-constructors/issues"},"license":"MIT","readmeFilename":"README.md"}