Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dtype

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dtype - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

7

index.js

@@ -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
}
}

9

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc