@nativescript-community/arraybuffers
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -6,2 +6,6 @@ # Change Log | ||
## [1.1.5](https://github.com/nativescript-community/arraybuffers/compare/v1.1.4...v1.1.5) (2023-11-17) | ||
**Note:** Version bump only for package @nativescript-community/arraybuffers | ||
## [1.1.4](https://github.com/nativescript-community/arraybuffers/compare/v1.1.3...v1.1.4) (2023-11-17) | ||
@@ -8,0 +12,0 @@ |
@@ -7,3 +7,3 @@ import { TypedArray } from '.'; | ||
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 arrayToNativeArray(array: number[] | Uint8Array, useInts?: boolean, canReturnBuffer?: boolean, useBytes?: boolean): any; | ||
export declare function nativeArrayToArray(array: any): number[]; |
@@ -69,3 +69,3 @@ let _runtimeVersion; | ||
} | ||
export function arrayToNativeArray(array, useInts = false, canReturnBuffer = true) { | ||
export function arrayToNativeArray(array, useInts = false, canReturnBuffer = true, useBytes = false) { | ||
const isBufferView = ArrayBuffer.isView(array); | ||
@@ -78,3 +78,3 @@ if (!Array.isArray(array) && !isBufferView) { | ||
if (!isBufferView && supportsDirectArrayBuffers()) { | ||
const nArray = createNativeArray(array.length, useInts); | ||
const nArray = createNativeArray(array.length, useInts, useBytes); | ||
for (let index = 0; index < array.length; index++) { | ||
@@ -81,0 +81,0 @@ nArray[index] = array[index]; |
@@ -6,5 +6,5 @@ export type FloatArray = Float32Array | Float64Array | Uint8Array; | ||
export function pointsFromBuffer(typedArray: TypedArray, useInts?: boolean, canReturnBuffer?: boolean): number[] | TypedArray; | ||
export function arrayToNativeArray(array, useInts?: boolean, canReturnBuffer?: boolean): number[]; | ||
export function arrayToNativeArray(array, useInts?: boolean, canReturnBuffer?: boolean, useBytes = false): number[]; | ||
export function createArrayBufferOrNativeArray(length: number, useInts?: boolean, canReturnBuffer?: boolean): number[] | TypedArray; | ||
export function nativeArrayToArray(array): number[]; | ||
export function supportsDirectArrayBuffers(): boolean; //android only |
{ | ||
"name": "@nativescript-community/arraybuffers", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Utility methods to work with Array Buffers in Nativescript", | ||
@@ -46,3 +46,3 @@ "main": "index", | ||
"bootstrapper": "nativescript-plugin-seed", | ||
"gitHead": "48a6cbf2a9fa4fe5888df6f79449071728c2915c" | ||
"gitHead": "5ae5aa6b703a7140b5fe933520e8ab9bc2ccfeab" | ||
} |
Sorry, the diff of this file is not supported yet
31555