{"id":15141933,"url":"https://github.com/mkloubert/nativescript-toolbox","last_synced_at":"2025-10-23T19:30:58.516Z","repository":{"id":9499557,"uuid":"62307611","full_name":"mkloubert/nativescript-toolbox","owner":"mkloubert","description":"A NativeScript module that is a composition of useful tools and helpers.","archived":false,"fork":false,"pushed_at":"2018-05-23T05:48:34.000Z","size":2312,"stargazers_count":55,"open_issues_count":5,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-01T12:03:26.866Z","etag":null,"topics":["library-catalogue","nativescript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkloubert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-30T12:08:23.000Z","updated_at":"2024-05-30T15:49:06.000Z","dependencies_parsed_at":"2022-08-07T05:01:04.652Z","dependency_job_id":null,"html_url":"https://github.com/mkloubert/nativescript-toolbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2Fnativescript-toolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2Fnativescript-toolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2Fnativescript-toolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkloubert%2Fnativescript-toolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkloubert","download_url":"https://codeload.github.com/mkloubert/nativescript-toolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867955,"owners_count":16555810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library-catalogue","nativescript"],"created_at":"2024-09-26T09:20:41.773Z","updated_at":"2025-10-23T19:30:57.925Z","avatar_url":"https://github.com/mkloubert.png","language":"JavaScript","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=X493PDBNGKAGG"],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/nativescript-toolbox.svg)](https://www.npmjs.com/package/nativescript-toolbox)\n[![npm](https://img.shields.io/npm/dt/nativescript-toolbox.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-toolbox)\n\n# NativeScript Toolbox\n\nA [NativeScript](https://nativescript.org/) module that is a composition of useful classes, tools and helpers.\n\nThe module contains the following sub modules:\n\n| Name | Description |\n| ---- | --------- |\n| [crypto-js](https://github.com/brix/crypto-js) | Library of crypto standards. |\n| [JS-YAML](https://github.com/nodeca/js-yaml) | YAML 1.2 parser / writer. |\n| [markdown](https://github.com/evilstreak/markdown-js) | Markdown parser. |\n| [Moment](https://github.com/moment/moment) | A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. |\n| [nativescript-apiclient](https://github.com/mkloubert/nativescript-apiclient) | Simply call HTTP based APIs. |\n| [nativescript-batch](https://github.com/mkloubert/nativescript-batch) | Implement batch operations. |\n| [nativescript-bitmap-factory](https://github.com/mkloubert/nativescript-bitmap-factory) | Create and manipulate bitmap images. |\n| [nativescript-email](https://github.com/EddyVerbruggen/nativescript-email) | An Email plugin for use in your NativeScript app. You can use it to compose emails, edit the draft manually, and send it. |\n| [nativescript-enumerable](https://github.com/mkloubert/nativescript-enumerable) | Provides LINQ style extensions for handling arrays and lists. |\n| [nativescript-lazy](https://github.com/mkloubert/nativescript-lazy) | Provides an OOP version of the build-in lazy function. |\n| [nativescript-routed-values](https://github.com/mkloubert/nativescript-routed-values) | Implement routed value graphs. |\n| [nativescript-sqlite (free)](https://github.com/nathanaela/nativescript-sqlite) | Provides sqlite actions. |\n| [nativescript-stringformat](https://github.com/mkloubert/nativescript-stringformat) | Helpers for handling strings. |\n| [nativescript-xmlobjects](https://github.com/mkloubert/nativescript-xmlobjects) | Handles XML data as objects similar to LINQ to XML. |\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=X493PDBNGKAGG)\n\n## License\n\n[MIT license](https://raw.githubusercontent.com/mkloubert/nativescript-toolbox/master/LICENSE)\n\n## Platforms\n\n* Android\n* iOS\n\n## Installation\n\nRun\n\n```bash\ntns plugin add nativescript-toolbox\n```\n\ninside your app project to install the module.\n\n## Usage\n\n```typescript\nimport Toolbox = require('nativescript-toolbox');\n```\n\nThe module provides the following function that are short hands for the included sub modules:\n\n| Name | Description |\n| ---- | --------- |\n| allowToSleep | Allows the device to go to sleep mode (based on [nativescript-insomnia](https://github.com/EddyVerbruggen/nativescript-insomnia)). |\n| asBitmap | Returns a value as bitmap object. |\n| asEnumerable | Returns a value as sequence. |\n| createBitmap | Creates a new bitmap. |\n| decrypt | Decrypts a value / an object with AES. |\n| encrypt | Encrypts a value / an object with AES. |\n| format | Formats a string. |\n| formatArray | Formats a string. |\n| fromMarkdown | Converts Markdown code. |\n| fromXml | Alias for 'parseXml'. |\n| fromYaml | Alias for 'parseYaml'. |\n| getApplicationContext | Returns the current application context. |\n| getClipboard | Returns an object that handles the clipboard of the device. |\n| getNativeView | Returns the native view of the app. |\n| getOrientation | Gets the current orientation of the device (based on [nativescript-orientation](https://github.com/nathanaela/nativescript-orientation)). |\n| getPlatform | Returns information of the current platform. |\n| getValue | Tries to return a value / object that is stored in the application settings. |\n| guid | Alias for 'uuid'. |\n| hash | Generic hash function. |\n| hasValue | Checks if a value / object is stored in the application settings. |\n| hideStatusBar | Short hand function for 'setStatusBarVisibility' for hiding the status bar. |\n| invokeForConnectivity | Invokes logic for a specific connectivity type. Requires permissions on Android ([android.permission.ACCESS_NETWORK_STATE](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_NETWORK_STATE)), e.g. |\n| invokeForOrientation | Invokes a callback for specific orientation mode. |\n| invokeForPlatform | Invokes an action for a specific platform. |\n| isEnumerable | Checks if a value is a sequence. |\n| keepAwake | Keeps the device awake (based on [nativescript-insomnia](https://github.com/EddyVerbruggen/nativescript-insomnia)). |\n| markdownToHtml | Short hand for 'fromMarkdown()' with HTML as target format. |\n| markdownToJson | Short hand for 'fromMarkdown()' with JSON as target format. |\n| md5 | Hashes a value with MD5. |\n| newBatch | Creates a new batch. |\n| newClient | Creates a new API client. |\n| now | Gets the current time. |\n| openDatabase | Opens a (SQLite) database (connection). |\n| openUrl | Open an URL on the device. |\n| openWifiSettings | Opens the WiFi settings on the device. |\n| parseXml | Parses a XML string to an object. |\n| parseYaml | Parses YAML data to an object. |\n| removeValue | Removes a value / object that is stored in the application settings. |\n| setStatusBarVisibility | Changes the visibility of the device's status bar (based on [nativescript-status-bar](https://github.com/PeterStaev/NativeScript-Status-Bar)).\n| setValue | Stores a value / object in the application settings. |\n| sha1 | Hashes a value with SHA-1. |\n| sha256 | Hashes a value with SHA-256. |\n| sha3 | Hashes a value with SHA-3. |\n| sha384 | Hashes a value with SHA-384. |\n| sha512 | Hashes a value with SHA-512. |\n| showStatusBar | Short hand function for 'setStatusBarVisibility' for showing the status bar. |\n| startMonitoringForConnectivity | Starts monitoring for connectivity (changes). Requires permissions on Android ([android.permission.ACCESS_NETWORK_STATE](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_NETWORK_STATE)), e.g. |\n| stopMonitoringForConnectivity | Stops monitoring for connectivity. Requires permissions on Android ([android.permission.ACCESS_NETWORK_STATE](https://developer.android.com/reference/android/Manifest.permission.html#ACCESS_NETWORK_STATE)), e.g. |\n| toYaml | Converts an object / a value to YAML. |\n| uuid | Creates a new unique ID / GUID (s. [Create GUID / UUID in JavaScript?](http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript)). |\n| vibrate | Vibrates the device. Requires permissions on Android ([android.permission.VIBRATE](https://developer.android.com/reference/android/Manifest.permission.html#VIBRATE)), e.g. (based on [nativescript-vibrate](https://github.com/anarchicknight/nativescript-vibrate)) |\n\n### Sub modules\n\n#### crypto-js\n\nHere are some examples of common algorithms:\n\n##### Encrypters\n\n```typescript\nvar AES = require(\"nativescript-toolbox/crypto-js/aes\");\n```\n\n##### Hashes\n\n```typescript\nvar MD5 = require('nativescript-toolbox/crypto-js/md5');\nvar SHA1 = require('nativescript-toolbox/crypto-js/sha1');\nvar SHA256 = require('nativescript-toolbox/crypto-js/sha256');\nvar SHA3 = require('nativescript-toolbox/crypto-js/sha3');\nvar SHA384 = require('nativescript-toolbox/crypto-js/sha384');\nvar SHA512 = require('nativescript-toolbox/crypto-js/sha512');\n```\n\n#### JS-YAML\n\n```typescript\nvar YAML = require('nativescript-toolbox/js-yaml');\n```\n\n#### markdown\n\n```typescript\nvar Markdown = require('nativescript-toolbox/markdown').markdown;\n\nvar json = Markdown.parse('Vessel     | Captain\\n-----------|-------------\\nNCC-1701   | James T Kirk\\nNCC-1701 A | James T Kirk\\nNCC-1701 D | Picard',\n                          'Maruku');\nvar html = Markdown.toHTML('Vessel     | Captain\\n-----------|-------------\\nNCC-1701   | James T Kirk\\nNCC-1701 A | James T Kirk\\nNCC-1701 D | Picard',\n                           'Maruku');\n```\n\n#### Moment\n\n```typescript\nimport Moment = require('nativescript-toolbox/moment');\n```\n\n#### nativescript-apiclient\n\n```typescript\nimport ApiClient = require('nativescript-toolbox/apiclient');\n```\n\n#### nativescript-batch\n\n```typescript\nimport Batch = require('nativescript-toolbox/batch');\n```\n\n#### nativescript-bitmap-factory\n\n```typescript\nimport BitmapFactory = require('nativescript-toolbox/bitmap-factory');\n```\n\n#### nativescript-email\n\n```typescript\nimport Email = require('nativescript-toolbox/email');\n```\n\n#### nativescript-enumerable\n\n```typescript\nimport Enumerable = require('nativescript-toolbox/enumerable');\n```\n\n#### nativescript-lazy\n\n```typescript\nimport Lazy = require('nativescript-toolbox/lazy');\n```\n\n#### nativescript-routed-values\n\n```typescript\nimport RoutedValues = require('nativescript-toolbox/routed-values');\n```\n\n#### nativescript-sqlite\n\n```typescript\nvar SQLite = require('nativescript-toolbox/sqlite');\n```\n\n#### nativescript-stringformat\n\n```typescript\nimport StringFormat = require('nativescript-toolbox/stringformat');\n```\n\n#### nativescript-xmlobjects\n\n```typescript\nimport XmlObjects = require('nativescript-toolbox/xmlobjects');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkloubert%2Fnativescript-toolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkloubert%2Fnativescript-toolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkloubert%2Fnativescript-toolbox/lists"}