You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ref-array

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ref-array - npm Package Compare versions

Comparing version

to
1.2.0

9

History.md

@@ -0,2 +1,11 @@

1.2.0 / 2016-10-14
==================
* [[`ba418e8fb3`](https://github.com/TooTallNate/ref-array/commit/ba418e8fb3)] - update "array-index" to v1 (Nathan Rajlich)
* [[`991e894d75`](https://github.com/TooTallNate/ref-array/commit/991e894d75)] - **package**: add "license" field (Nathan Rajlich)
* [[`d0565662a3`](https://github.com/TooTallNate/ref-array/commit/d0565662a3)] - **package**: update dev deps (Nathan Rajlich)
* [[`cce5fb960c`](https://github.com/TooTallNate/ref-array/commit/cce5fb960c)] - **array**: s/slicer/slice/ (Nathan Rajlich)
* [[`8050a81587`](https://github.com/TooTallNate/ref-array/commit/8050a81587)] - **appveyor**: fix node v0.8, test io.js v2.5 and v3 (Nathan Rajlich)
* [[`c636c37e80`](https://github.com/TooTallNate/ref-array/commit/c636c37e80)] - **test**: add a test for passing Arrays to a native addon function (Nathan Rajlich)
1.1.2 / 2015-08-27

@@ -3,0 +12,0 @@ ==================

24

lib/array.js

@@ -106,16 +106,2 @@

},
// part of the "array-index" interface
__get__: {
value: getter,
enumerable: true,
writable: true,
configurable: true
},
// part of the "array-index" interface
__set__: {
value: setter,
enumerable: true,
writable: true,
configurable: true
},
// "node-ffi" calls this when passed an array instance to an ffi'd function

@@ -130,9 +116,13 @@ ref: {

slice: {
value: slicer,
value: slice,
enumerable: true,
writable: true,
configurable: true
}
}
})
// part of the "array-index" interface
ArrayType.prototype[ArrayIndex.get] = getter
ArrayType.prototype[ArrayIndex.set] = setter
// save down the "fixedLength" if specified. "ref-struct" needs this value

@@ -295,3 +285,3 @@ if (fixedLength > 0) {

function slicer (start, end) {
function slice (start, end) {
var data

@@ -298,0 +288,0 @@

@@ -8,3 +8,3 @@ {

],
"version": "1.1.2",
"version": "1.2.0",
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://tootallnate.net)",

@@ -16,2 +16,3 @@ "repository": {

"main": "./lib/array.js",
"license": "MIT",
"scripts": {

@@ -21,3 +22,3 @@ "test": "node-gyp rebuild --directory test && mocha -gc --reporter spec"

"dependencies": {
"array-index": "~0.1.1",
"array-index": "1",
"debug": "2",

@@ -27,6 +28,6 @@ "ref": "1"

"devDependencies": {
"bindings": "~1.2.0",
"mocha": "*",
"bindings": "1",
"mocha": "3",
"nan": "2"
}
}

@@ -188,5 +188,19 @@

assert.equal(y[2], x[3])
})
})
})
describe('native tests', function () {
var IntArray = ArrayType('int')
it('should be pass an Array to a native function', function () {
var input = [-1, -25, -3111, -41234, -5]
var array = new IntArray(input)
bindings.arrayAbs(array.buffer, array.length)
assert.deepEqual(array.toJSON(), input.map(Math.abs))
})
})
})

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet