@nativescript-community/arraybuffers
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.1.0](https://github.com/nativescript-community/arraybuffers/compare/v1.0.3...v1.1.0) (2022-10-17) | ||
### Features | ||
* **android:** native api usage ([59456bf](https://github.com/nativescript-community/arraybuffers/commit/59456bf0421138cf7a84de3cdd4012c9f5009faf)) | ||
## [1.0.3](https://github.com/nativescript-community/arraybuffers/compare/v1.0.2...v1.0.3) (2022-10-17) | ||
@@ -8,0 +19,0 @@ |
@@ -6,4 +6,4 @@ import { TypedArray } from '.'; | ||
export declare function createArrayBuffer(length: number, useInts?: boolean, canReturnBuffer?: boolean): TypedArray; | ||
export declare function pointsFromBuffer(typedArray: TypedArray, useInts?: boolean, canReturnBuffer?: boolean): androidNative.Array<number>; | ||
export declare function arrayToNativeArray(array: number[] | Uint8Array, useInts?: boolean, canReturnBuffer?: boolean): androidNative.Array<number>; | ||
export declare function pointsFromBuffer(typedArray: TypedArray, useInts?: boolean, canReturnBuffer?: boolean): any; | ||
export declare function arrayToNativeArray(array: number[] | Uint8Array, useInts?: boolean, canReturnBuffer?: boolean): any; | ||
export declare function nativeArrayToArray(array: any): number[]; |
@@ -52,3 +52,6 @@ let _runtimeVersion; | ||
if (useInts) { | ||
return buffer.nativeObject.array(); | ||
buffer.nativeObject.rewind(); | ||
const bytes = Array.create('byte', buffer.byteLength); | ||
buffer.nativeObject.get(bytes); | ||
return bytes; | ||
} | ||
@@ -55,0 +58,0 @@ const testArray = Array.create('float', length); |
{ | ||
"name": "@nativescript-community/arraybuffers", | ||
"version": "1.0.3", | ||
"version": "1.1.0", | ||
"description": "Utility methods to work with Array Buffers in Nativescript", | ||
@@ -46,3 +46,3 @@ "main": "index", | ||
"bootstrapper": "nativescript-plugin-seed", | ||
"gitHead": "360c6c3b380701f2fe13d02380d27d82404b5e9a" | ||
"gitHead": "2c54f0bb22f2d209e170d2f4a91b6469598802ec" | ||
} |
Sorry, the diff of this file is not supported yet
29868
14
155