{"_id":"dtype","_rev":"4215923","name":"dtype","description":"Return a data type from a string representing the type","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"shama","email":""}],"time":{"modified":"2026-03-04T17:10:43.000Z","created":"2013-07-02T06:36:21.371Z","2.0.0":"2015-05-25T20:16:33.056Z","1.0.0":"2015-05-07T01:45:28.197Z","0.1.0":"2013-07-02T06:36:21.371Z"},"users":{},"author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/dtype.git"},"versions":{"2.0.0":{"name":"dtype","description":"Return a data type from a string representing the type","version":"2.0.0","homepage":"https://github.com/shama/dtype","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/dtype.git"},"bugs":{"url":"https://github.com/shama/dtype/issues"},"license":"MIT","engines":{"node":">= 0.8.0"},"scripts":{"test":"node test.js"},"dependencies":{},"devDependencies":{"tape":"^4.0.0"},"keywords":["ndarray","array","typed"],"gitHead":"9da5997b968f7ddce4c0cbe74452b40eb39a32b3","_id":"dtype@2.0.0","_shasum":"cd052323ce061444ecd2e8f5748f69a29be28434","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"shama","email":""}],"dist":{"shasum":"cd052323ce061444ecd2e8f5748f69a29be28434","size":2143,"noattachment":false,"key":"/dtype/-/dtype-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dtype/download/dtype-2.0.0.tgz"},"directories":{},"publish_time":1432584993056,"_hasShrinkwrap":false,"_cnpm_publish_time":1432584993056,"_cnpmcore_publish_time":"2021-12-16T21:38:47.939Z"},"1.0.0":{"name":"dtype","description":"Return a data type from a string representing the type","version":"1.0.0","homepage":"https://github.com/shama/dtype","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/dtype.git"},"bugs":{"url":"https://github.com/shama/dtype/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/dtype/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test.js"},"dependencies":{},"devDependencies":{"tape":"^4.0.0"},"keywords":["ndarray","array","typed"],"gitHead":"b6c78968963f8565a9f985dd22816b955dee5aba","_id":"dtype@1.0.0","_shasum":"ae34ffa282673715203582d61bbdd0aad3cba3e7","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.8.1","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"shama","email":""}],"dist":{"shasum":"ae34ffa282673715203582d61bbdd0aad3cba3e7","size":2104,"noattachment":false,"key":"/dtype/-/dtype-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dtype/download/dtype-1.0.0.tgz"},"directories":{},"publish_time":1430963128197,"_hasShrinkwrap":false,"_cnpm_publish_time":1430963128197,"_cnpmcore_publish_time":"2021-12-16T21:38:48.252Z"},"0.1.0":{"name":"dtype","description":"Return a data type from a string representing the type","version":"0.1.0","homepage":"https://github.com/shama/dtype","author":{"name":"Kyle Robinson Young","email":"kyle@dontkry.com","url":"http://dontkry.com"},"repository":{"type":"git","url":"git://github.com/shama/dtype.git"},"bugs":{"url":"https://github.com/shama/dtype/issues"},"licenses":[{"type":"MIT","url":"https://github.com/shama/dtype/blob/master/LICENSE-MIT"}],"engines":{"node":">= 0.8.0"},"scripts":{"test":"node test.js"},"dependencies":{},"devDependencies":{"tape":"~1.0.4"},"keywords":["ndarray","array","typed"],"readmeFilename":"README.md","_id":"dtype@0.1.0","dist":{"shasum":"1839ef742e6d4beac1e5ef350eff044825e1688a","size":1958,"noattachment":false,"key":"/dtype/-/dtype-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/dtype/download/dtype-0.1.0.tgz"},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"shama","email":"kyle@dontkry.com"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"},{"name":"shama","email":""}],"directories":{},"publish_time":1372746981371,"_hasShrinkwrap":false,"_cnpm_publish_time":1372746981371,"_cnpmcore_publish_time":"2021-12-16T21:38:48.442Z"}},"readme":"# dtype\n\nReturn a data type from a string representing the data type.\n\nMostly useful for using with [ndarray](https://github.com/mikolalysenko/ndarray)\nwhere you would like instantiate a typed array of the same `array.dtype`.\n\nSee [ndarray-dtype](https://www.npmjs.com/package/ndarray-dtype) if you need to support Buffer and other ndarray types.\n\n## example\n\n```js\nvar dtype = require('dtype')\nvar ndarray = require('ndarray')\n\nvar arr = ndarray(new Int8Array(32))\n\n// some time later\n\nvar newarr = ndarray(new (dtype(arr.dtype)))\n```\n\n## API\n`dtype(string)` will return the following data types based on the strings given:\n\nData type | String\n--------: | :-----\n`Int8Array` | \"int8\"\n`Int16Array` | \"int16\"\n`Int32Array` | \"int32\"\n`Uint8Array` | \"uint8\"\n`Uint16Array` | \"uint16\"\n`Uint32Array` | \"uint32\"\n`Float32Array` | \"float32\"\n`Float64Array` | \"float64\"\n`Array` | \"array\"\n`Uint8ClampedArray` | \"uint8_clamped\"\n\nReturns `undefined` if the type isn't recognized.\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install dtype\n```\n\nUse [browserify](http://browserify.org) to `require('dtype')`.\n\n## see also\n\n- [ndarray-dtype](https://www.npmjs.com/package/ndarray-dtype)\n\n## release history\n* 2.0.0 - moving buffer, generic and data to a different module\n* 1.0.0 - Add uint8_clamped, generic, data, dataview and buffer types\n* 0.1.0 - initial release\n\n## license\nCopyright (c) 2015 Kyle Robinson Young<br/>\nLicensed under the MIT license.\n","_attachments":{},"homepage":"https://github.com/shama/dtype","bugs":{"url":"https://github.com/shama/dtype/issues"},"license":"MIT"}