JSPM

  • Created
  • Published
  • Downloads 17
  • Score
    100M100P100Q82639F
  • License

A NativeScript module that is a composition of useful classes, tools and helpers.

Package Exports

  • nativescript-toolbox

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-toolbox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm npm

NativeScript Toolbox

A NativeScript module that is a composition of useful classes, tools and helpers.

The module contains the following sub modules:

Name Description
Moment A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates.
nativescript-apiclient Simply call HTTP based APIs.
nativescript-batch Implement batch operations.
nativescript-bitmap-factory Create and manipulate bitmap images.
nativescript-enumerable Provides LINQ style extensions for handling arrays and lists.
nativescript-routed-values Implement routed value graphs.
nativescript-sqlite (free) Provides sqlite actions.
nativescript-stringformat Helpers for handling strings.
nativescript-xmlobjects Handles XML data as objects similar to LINQ to XML.

Donate

License

MIT license

Platforms

  • Android
  • iOS

Installation

Run

tns plugin add nativescript-toolbox

inside your app project to install the module.

Usage

import Toolbox = require('nativescript-toolbox');

The module provides the following function that are short hands for the included sub modules:

Name Description
asBitmap Returns a value as bitmap object.
asEnumerable Returns a value as sequence.
createBitmap Creates a new bitmap.
format Formats a string.
formatArray Formats a string.
getApplicationContext Returns the current application context.
getNativeView Returns the native view of the app.
getPlatform Returns information of the current platform.
invokeForPlatform Invokes an action for a specific platform.
isDebug Checks if the device is in debug mode or not.
isEnumerable Checks if a value is a sequence.
newBatch Creates a new batch.
newClient Creates a new API client.
now Gets the current time.
openDatabase Opens a (SQLite) database (connection).
openUrl Open an URL on the device.

Sub modules

Moment

import Moment = require('nativescript-toolbox/moment');

nativescript-apiclient

import ApiClient = require('nativescript-toolbox/apiclient');

nativescript-batch

import Batch = require('nativescript-toolbox/batch');

nativescript-bitmap-factory

import BitmapFactory = require('nativescript-toolbox/bitmap-factory');

nativescript-enumerable

import Enumerable = require('nativescript-toolbox/enumerable');

nativescript-routed-values

import RoutedValues = require('nativescript-toolbox/routed-values');

nativescript-sqlite

var SQLite = require('nativescript-toolbox/sqlite');

nativescript-stringformat

import StringFormat = require('nativescript-toolbox/stringformat');

nativescript-xmlobjects

import XmlObjects = require('nativescript-toolbox/xmlobjects');