{"_id":"dstructs-cast-arrays","_rev":"4-ee0b4ea35cdd8958690f79fe9bd3acf6","name":"dstructs-cast-arrays","description":"Casts an array to an array of a different data type.","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.2":{"name":"dstructs-cast-arrays","version":"1.0.2","description":"Casts an array to an array of a different 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/cast-arrays.git"},"keywords":["compute.io","compute","computation","dstructs","cast","typed-array","typed","array","array-like","constructor","ctor","dtype","data","type","copy","clone"],"bugs":{"url":"https://github.com/dstructs/cast-arrays/issues"},"dependencies":{"dstructs-array-constructors":"^1.0.2","dstructs-array-dtype":"^1.0.2","type-name":"^1.0.1","validate.io-array-like":"^1.0.1"},"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":"2f6d5346762e4b4883860dbb4c6c19c5200f2174","homepage":"https://github.com/dstructs/cast-arrays#readme","_id":"dstructs-cast-arrays@1.0.2","_shasum":"8a57de5256f90ed92b0ed11c46488778557273a7","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"8a57de5256f90ed92b0ed11c46488778557273a7","tarball":"https://registry.npmjs.org/dstructs-cast-arrays/-/dstructs-cast-arrays-1.0.2.tgz","integrity":"sha512-X+nGHOrnzxnS9afv5CYZTlNLTsQoJhjXOeQc4cMlfmnROtLz8ioMRYKYYo3fnpCRGHz+TtLgq97h4e53LTl6qw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyaUfUgel7RJfkUDJ8WAs0GOvWDtPvlh/wiyDV7LwPPAiEAuElRbkTs5lcXlugYn+fWPaEFy0PwuQWH/pYmUhToIEM="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]},"1.0.3":{"name":"dstructs-cast-arrays","version":"1.0.3","description":"Casts an array to an array of a different 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/cast-arrays.git"},"keywords":["compute.io","compute","computation","dstructs","cast","typed-array","typed","array","array-like","constructor","ctor","dtype","data","type","copy","clone"],"bugs":{"url":"https://github.com/dstructs/cast-arrays/issues"},"dependencies":{"dstructs-array-constructors":"^1.0.2","dstructs-array-dtype":"^1.0.2","type-name":"^1.0.1","validate.io-array-like":"^1.0.1"},"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":"ac4d90e91535c91ea4e7e8eb3663565af94433ac","homepage":"https://github.com/dstructs/cast-arrays#readme","_id":"dstructs-cast-arrays@1.0.3","_shasum":"f2cba069ea7431dad5d779601a51d59976c2bc25","_from":".","_npmVersion":"2.8.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kgryte","email":"kgryte@gmail.com"},"dist":{"shasum":"f2cba069ea7431dad5d779601a51d59976c2bc25","tarball":"https://registry.npmjs.org/dstructs-cast-arrays/-/dstructs-cast-arrays-1.0.3.tgz","integrity":"sha512-8vaSVISy7ugCfzUxC+Eeui4cjwDT4BpHVZVHJKEy/pxYZi9DT1VkKxiFfYsgZnv8r5wlK+hcDEYE96AnJSlH7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+nxmdReaMrkp+maLfQwFiYk0CL5hXIoxuqAJTpE2wJAiBmmKyWeiyQJr4XmDiD/s22gVgx7lR+GtmQMZ3kMy5nFw=="}]},"maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}]}},"readme":"cast-arrays\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> Casts an array to an array of a different data type.\n\n\n## Installation\n\n``` bash\n$ npm install dstructs-cast-arrays\n```\n\nFor use in the browser, use [browserify][browserify].\n\n\n## Usage\n\n``` javascript\nvar cast = require( 'dstructs-cast-arrays' );\n```\n\n#### cast( x, type )\n\nCasts an input `array` or [`array-like`][array-like] object to a specified `array` type.\n\n``` javascript\nvar arr = Int32Array( 10 );\n\nvar out = cast( arr, 'float32' );\n// returns Float32Array\n```\n\n`type` may be either a `string` specifying the desired output `array` data type or a value from which the desired data type should be inferred.\n\n``` javascript\nvar x = Int32Array( 10 ),\n\ty = Float32Array( 25 );\n\n// Cast `x` to be the same data type as `y`:\nvar out = cast( x, y );\n// returns Float32Array\n```\n\nFor a list of supported output `array` data types, see [dstructs-array-constructors][dstructs-array-constructors].\n\n\n\n## Examples\n\n``` javascript\nvar cast = require( 'dstructs-cast-arrays' ),\n\tarr,\n\tx, y, z;\n\narr = new Int8Array( 10 );\nx = cast( arr, 'int16' );\n// returns Int16Array\n\narr = new Array( 100 );\ny = cast( arr, 'float64' );\n// returns Float64Array\n\nz = cast( x, y );\n// returns Float64Array\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/dstructs-cast-arrays.svg\n[npm-url]: https://npmjs.org/package/dstructs-cast-arrays\n\n[travis-image]: http://img.shields.io/travis/dstructs/cast-arrays/master.svg\n[travis-url]: https://travis-ci.org/dstructs/cast-arrays\n\n[codecov-image]: https://img.shields.io/codecov/c/github/dstructs/cast-arrays/master.svg\n[codecov-url]: https://codecov.io/github/dstructs/cast-arrays?branch=master\n\n[dependencies-image]: http://img.shields.io/david/dstructs/cast-arrays.svg\n[dependencies-url]: https://david-dm.org/dstructs/cast-arrays\n\n[dev-dependencies-image]: http://img.shields.io/david/dev/dstructs/cast-arrays.svg\n[dev-dependencies-url]: https://david-dm.org/dev/dstructs/cast-arrays\n\n[github-issues-image]: http://img.shields.io/github/issues/dstructs/cast-arrays.svg\n[github-issues-url]: https://github.com/dstructs/cast-arrays/issues\n\n[browserify]: https://github.com/substack/node-browserify\n[mocha]: http://mochajs.org/\n[chai]: http://chaijs.com\n[istanbul]: https://github.com/gotwarlost/istanbul\n\n[array-like]: https://github.com/validate-io/array-like\n[dstructs-array-constructors]: https://github.com/dstructs/array-constructors\n","maintainers":[{"name":"kgryte","email":"kgryte@gmail.com"}],"time":{"modified":"2022-06-16T01:03:30.800Z","created":"2015-11-28T01:10:26.581Z","1.0.2":"2015-11-28T01:10:26.581Z","1.0.3":"2015-12-04T21:35:52.735Z"},"homepage":"https://github.com/dstructs/cast-arrays#readme","keywords":["compute.io","compute","computation","dstructs","cast","typed-array","typed","array","array-like","constructor","ctor","dtype","data","type","copy","clone"],"repository":{"type":"git","url":"git://github.com/dstructs/cast-arrays.git"},"contributors":[{"name":"Athan Reines","email":"kgryte@gmail.com"}],"author":{"name":"Athan Reines","email":"kgryte@gmail.com"},"bugs":{"url":"https://github.com/dstructs/cast-arrays/issues"},"license":"MIT","readmeFilename":"README.md"}