Comparing version 1.0.0 to 2.0.0
@@ -23,10 +23,3 @@ module.exports = function(dtype) { | ||
return Uint8ClampedArray | ||
case 'generic': | ||
case 'data': | ||
case 'dataview': | ||
return ArrayBuffer | ||
case 'buffer': | ||
if (typeof Buffer === "undefined") return ArrayBuffer | ||
return Buffer | ||
} | ||
} |
{ | ||
"name": "dtype", | ||
"description": "Return a data type from a string representing the type", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"homepage": "https://github.com/shama/dtype", | ||
@@ -18,8 +18,3 @@ "author": { | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/shama/dtype/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
@@ -26,0 +21,0 @@ "node": ">= 0.8.0" |
@@ -8,2 +8,4 @@ # dtype | ||
See [ndarray-dtype](https://www.npmjs.com/package/ndarray-dtype) if you need to support Buffer and other ndarray types. | ||
## example | ||
@@ -37,8 +39,4 @@ | ||
`Uint8ClampedArray` | "uint8_clamped" | ||
`ArrayBuffer` | "generic" | ||
`ArrayBuffer` | "data" | ||
`ArrayBuffer` | "dataview" | ||
`Buffer` | "buffer" | ||
> If `Buffer` is not present then `"buffer"` will return `ArrayBuffer`. | ||
Returns `undefined` if the type isn't recognized. | ||
@@ -55,7 +53,13 @@ ## install | ||
## see also | ||
- [ndarray-dtype](https://www.npmjs.com/package/ndarray-dtype) | ||
## release history | ||
* 2.0.0 - moving buffer, generic and data to a different module | ||
* 1.0.0 - Add uint8_clamped, generic, data, dataview and buffer types | ||
* 0.1.0 - initial release | ||
## license | ||
Copyright (c) 2013 Kyle Robinson Young<br/> | ||
Copyright (c) 2015 Kyle Robinson Young<br/> | ||
Licensed under the MIT license. |
@@ -26,4 +26,3 @@ var test = require('tape') | ||
t.ok(arr instanceof Uint8ClampedArray) | ||
arr = new (dtype('buffer'))(0) | ||
t.ok(arr instanceof Buffer) | ||
t.equal(dtype('buffer'), undefined, 'returns undefined for non-array types') | ||
}) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63
4541
50