Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nativescript-community/arraybuffers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@nativescript-community/arraybuffers
Utility methods to work with Array Buffers in Nativescript
Table of Contents
Installation
Run the following command from the root of your project:
ns plugin add @nativescript-community/arraybuffers
API
This is a simple Array Buffers helpers for Nativescript to use optimized arrays on Android It exposes a few methods:
type FloatArray = Float32Array | Float64Array | Uint8Array;
type TypedArray = FloatArray | Uint8Array;
function createArrayBuffer(length: number, useInts?: boolean): TypedArray;
function createNativeArray(length: number, useInts?: boolean): number[];
function pointsFromBuffer(typedArray: TypedArray, useInts?: boolean, canReturnBuffer?: boolean): number[] | TypedArray;
function arrayToNativeArray(array, useInts?: boolean, canReturnBuffer?: boolean): number[];
function nativeArrayToArray(array): number[];
function supportsDirectArrayBuffers(): boolean;