open-index/open-npm huggingface dataset:
npm package: @nativescript-community/licenses
Description: Nativescript plugin to generate licenses JSON files
Author: Martin Guillon
Latest version: 2.0.9

﻿[npm-image]: http://img.shields.io/npm/v/@nativescript-community/licenses.svg
[npm-url]: https://npmjs.org/package/@nativescript-community/licenses
[downloads-image]: http://img.shields.io/npm/dm/@nativescript-community/licenses.svg

### Installation

On iOS you need to run this first:
```
gem install cocoapods-acknowledgements
```

## Usage

This plugin is a plugin to easily integrate licenses used your apps.
The plugin will automatically generate `licenses.json`
You simply need to load the `licenses.json` from anywhere in your app using either `require('licenses.json')` or `require('~/licenses.json')`
You can then simply `require` that file to use it in your app.
Here is an example JSON file format (`moduleDescription` not present on Android):

```json
{
    "dependencies": [
        {
            "moduleName": "com.airbnb.android:lottie",
            "moduleDescription": "description",
            "moduleUrl": "https://github.com/airbnb/lottie-android",
            "moduleVersion": "3.4.2",
            "moduleLicense": "Apache License, Version 2.0",
            "moduleLicenseUrl": "https://www.apache.org/licenses/LICENSE-2.0"
        }
    ]
}
```
npm package: @nativescript-community/nordic-dfu
Description: A NativeScript plugin for performing Nordic Bluetooth device firmware updates.
Author: CatchABus
Latest version: 2.2.0

# @nativescript-community/nordic-dfu

A NativeScript plugin that integrates Nordic Semiconductor’s DFU (Device Firmware Update) library, enabling seamless Bluetooth OTA firmware updates for compatible BLE devices.  
Built using Nordic’s official [android](https://github.com/NordicSemiconductor/Android-DFU-Library) and [iOS](https://github.com/NordicSemiconductor/IOS-DFU-Library) DFU libraries, this plugin provides a native bridge for initiating and monitoring firmware updates across iOS and Android — fully accessible from JavaScript/TypeScript.

## Installation

```javascript
npm install @nativescript-community/nordic-dfu
```

## Usage
By default, android will start the process in the foreground so make sure to add the following permissions in the manifest file:
```xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"/>
```

If you want to avoid this behaviour because you don't really need foreground activity and Google play complains about permissions, it can be disabled on the DFU initiator instance:
```ts
initiator.setAndroidForeground(false);
```

Sample:
```ts
import { DFUInitiator, DfuProgressEventData, DfuStateChangedEventData } from '@nativescript-community/nordic-dfu';

const myDeviceUUID = 'a string representation of UUID/address';
const filePath = '/test/file.zip';

const initiator = new DFUInitiator(myDeviceUUID);

initiator.on("DFUStateChanged", (args: DfuStateChangedEventData) => {
  if (args.state === DfuState.DFU_COMPLETED) {
    console.log("DFU completed!");
  }
});

initiator.on("DFUProgress", (args: DfuProgressEventData) => {
  console.log(`Progress: ${args.percent}%`);
});

const controller = initiator.start(filePath);

// Use controller to manipulate the procedure
setTimeout(() => {
  controller.pause();
}, 2000);

setTimeout(() => {
  controller.resume();
}, 4000);

setTimeout(() => {
  controller.abort();
}, 5000);
```

## License

Apache License Version 2.0
npm package: @nativescript-community/observable
Description: Nativescript Observable class extension.
Author: Martin Guillon
Latest version: 2.0.11

[![npm](https://img.shields.io/npm/v/@nativescript-community/observable.svg)](https://www.npmjs.com/package/@nativescript-community/observable)
[![npm](https://img.shields.io/npm/dt/@nativescript-community/observable.svg?label=npm%20downloads)](https://www.npmjs.com/package/@nativescript-community/observable)
[![GitHub forks](https://img.shields.io/github/forks/Akylas/@nativescript-community/observable.svg)](https://github.com/nativescript-community/observable/network)
[![GitHub stars](https://img.shields.io/github/stars/Akylas/@nativescript-community/observable.svg)](https://github.com/nativescript-community/observable/stargazers)

[![NPM](https://nodei.co/npm/@nativescript-community/observable.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/@nativescript-community/observable/)

## Installation

* `tns plugin add @nativescript-community/observable`

Be sure to run a new build after adding plugins to avoid any issues.

---

this is a simple subclass of TNS Observable class which let the observable know when a listener was added or removed.
Very useful to create native object to listen for native event only when necessary
npm package: @nativescript-community/preferences
Description: Common API to allow users to use native (familiar) app settings screens instead of having to craft custom UIs
Author: Steve McNiven-Scott
Latest version: 1.3.2

[![Twitter Follow][twitter-image]][twitter-url]

[twitter-image]:https://img.shields.io/twitter/follow/stevemcniven.svg?style=social&label=Follow%20me
[twitter-url]:https://twitter.com/stevemcniven


# @nativescript-community/preferences

This plugin allows native preference saving\loading on iOS and Android

<img src="https://raw.githubusercontent.com/sitefinitysteve/@nativescript-community/preferences/master/images/ios-sample.gif" width="200" />
<img src="https://raw.githubusercontent.com/sitefinitysteve/@nativescript-community/preferences/master/images/android-sample.gif" width="200" />

## iOS Prerequisites

* Create iOS Settings.bundle files in App_Resources/iOS [See Demo](https://github.com/sitefinitysteve/@nativescript-community/preferences/tree/master/demo/app/App_Resources/iOS/Settings.bundle)
or [Apple Developer docs](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html)

## Android Prerequisites
* In App_Resources/Android/xml create [preferences.xml](https://github.com/sitefinitysteve/@nativescript-community/preferences/blob/master/demo/app/App_Resources/Android/xml/preferences.xml)
* Android [PreferenceScreen docs](https://developer.android.com/reference/android/preference/PreferenceScreen.html)

## Installation

Describe your plugin installation steps. Ideally it would be something like:

```javascript
tns plugin add @nativescript-community/preferences
```

## Usage 

```javascript
    var prefs = new Preferences();

    //Get existing value
    prefs.getValue("name_preference");

    //Set value
    prefs.setValue("name_preference", "some new text");
```

## API
    
| Property | Default | Description |
| --- | --- | --- |
| openSettings(): any; |  | Opens the native settings panes |
| getValue(key: string): any; |  | Gets the value for the preference |
| setValue(key: string, value: any): void; |  | Sets the passed value to the preference |
    
## License

Apache License Version 2.0, January 2004