Package Exports
- nativescript-utilities
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-utilities) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nativescript-utilities
A (currently small) collection of reusable NativeScript utility classes and functions.
Usage
Check out the API docs for the current utilities' documentation. Every class and function can be imported by name:
import { Logger, convertUint8ArrayToReference } from 'nativescript-utilities';
try {
let bytesReference = convertUint8ArrayToReference(new Uint8Array([ 0x90, 0xC3, 0xFF ]));
// Do something with the interop.Reference instance, like pass it to some native C library.
} catch (error) {
logger.error(`Something happened while trying to send the buffer.`, { error });
}
building
This module is implemented in ES 6 and transpiled to ES 5 for export. To build the source:
npm run build
There's also a git pre-commit hook that automatically builds upon commit, since the dist directory is committed.
linting
npm run lint