open-index/open-npm huggingface dataset:
npm package: @iqrok/keyboard-listener
Description: Keyboard evdev event listener
Author: iqrok
Latest version: 0.2.0

# Keyboard Listener

Listen to keyboard evdev event.
For more complete evdev listener, please check this library [evdev](https://github.com/sdumetz/node-evdev).

The intended use of this package is to listen to any keyboard-like device, such as RFID Reader or Barcode scanner.

This package needs the path to device input event, so it probably works only in **Linux**. Make sure you have read access to the input event path.

# Usage

To list available input event

```bash
$ ls /dev/input
total 0
drwxr-xr-x  4 root root     580 Jun  6 20:48 .
drwxr-xr-x 22 root root    4500 Jun  6 22:21 ..
drwxr-xr-x  2 root root     120 Jun  6 20:48 by-id
drwxr-xr-x  2 root root     260 Jun  6 20:48 by-path
crw-rw----  1 root input 13, 64 Jun  2 22:45 event9
crw-rw----  1 root input 13, 65 Jun  2 22:45 event11
crw-rw----  1 root input 13, 74 Jun  2 22:45 event18

# or

$ ls /dev/input/by-id/ -la
total 0
drwxr-xr-x 2 root root 120 Jun  6 20:48 .
drwxr-xr-x 4 root root 580 Jun  6 20:48 ..
lrwxrwxrwx 1 root root  10 Jun  2 22:45 usb-Generic_Integrated_Camera_200901010001-event-if00 -> ../event11
lrwxrwxrwx 1 root root   9 Jun  2 22:45 usb-Logitech_USB_Optical_Mouse-event-mouse -> ../event9
lrwxrwxrwx 1 root root   9 Jun  2 22:45 usb-Logitech_USB_Optical_Mouse-mouse -> ../mouse4
lrwxrwxrwx 1 root root  10 Jun  6 20:48 usb-USB_Adapter_USB_Device-event-kbd -> ../event18
```

```javascript
const KeyboarListener = require('@iqrok/keyboard-listener');
const eventpath = '/dev/input/by-id/usb-USB_Adapter_USB_Device-event-kbd';

const keyboard = new KeyboarListener();

keyboard.init({
			path: eventpath,
			readline: {
				on: 'keydown',
				debounce: 1000,
			},
		})
	.on('data', rec => console.log(rec))
	.on('readline', rec => console.log('line:', rec))
	.open();
```

# References

1. https://www.kernel.org/doc/Documentation/input/event-codes.txt
2. https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
npm package: @iqrok/pcsclite.helper
Description: wrapper for pcsclite package
Author: iqrok
Latest version: 0.1.1

# pcsclite Helper

this package is only a wrapper for [pcsclite](https://www.npmjs.com/package/pcsclite). Only tested on Ubuntu/Debian using ACR122U and MIFARE 1K card.

## Prerequisites
You must install these packages first
```shell
sudo apt install libpcsclite1 libpcsclite-dev pcscd libacsccid1
```
__NOTE:__ libacsccid1 is required for ACR122U reader

these kernel modules must be removed in order to make pcsc reader detected:
```shell
# remove kernel modules temporarily
sudo rmmod pn533_usb pn533 nfc

# block kernel modules permanently
echo "install nfc /bin/false" | sudo tee -a /etc/modprobe.d/blacklist.conf
echo "install pn533 /bin/false" | sudo tee -a /etc/modprobe.d/blacklist.conf
echo "install pn533_usb /bin/false" | sudo tee -a /etc/modprobe.d/blacklist.conf
```

You can execute `enablepcsc.sh`, included in this repository, to simplify the steps above.

## Installation
```shell
npm install @iqrok/pcsclite.helper
```

## Example
```javascript
const RFID = require('@iqrok/pcsclite.helper');

// check if pcscd is available or not
if(!RFID){
	console.error('pcscd service is not running!', RFID);
	return;
}

(async () => {
	await RFID.setTimeout(0xff);

	RFID.on('reader', received => {
		console.log('reader', received);
	});

	RFID.on('status', received => {
		console.log('status', received);
	});

	RFID.on('error', received => {
		console.log('error', received);
	});

	RFID.on('data', received => {
		console.log('data', received);
	});

	RFID.on('blocks', received => {
		console.log('blocks', received);
	});

	RFID.on('removed', received => {
		console.log('card removed', received);
	});

	RFID.on('uid', received => {
		console.log('card uid', received);
	});

	RFID.on('ready', async protocol => {
		const obj = {
			id: '12345678',
			time: Date.now(),
		};

		const input = JSON.stringify(obj);
		const block = 4;

		const write = await RFID.writeBlocks(input, block);

		const read = [
			await RFID.readBlocks(block),
			await RFID.readBlocksString(block),
			await RFID.readBlocksJSON(block),
		];

		const status = await RFID.status(block);

		console.log('--------- Data Written ---------');
		console.log('Input :', input);
		console.log('Write :', write);
		console.log('--------- Data Read ---------');
		console.log('RAW', read[0]);
		console.log('STRING', read[1]);
		console.log('JSON', read[2]);
		console.log('--------- ---- ---- ---------');
	});
})();
```

## Events
|Event Name|Triggered on|
|---|---|
|reader|reader status is changed|
|status|reader connection status is changed|
|card-status|request RFID card status|
|error|there's error in reader or card action|
|data|incoming data from RFID card|
|blocks|incoming data after reading multiple blocks|
|ready|RFID card is connected to reader|
|removed|RFID card is removed from reader|
|uid|RFID card uid|
npm package: @iqrok/serial.helper
Description: Helper for serialport package in async/await
Author: iqrok
Latest version: 0.5.3

# serialport Helper

## Installation
```bash
npm install @iqrok/serial.helper
```

## Usage
```javascript
const serialHelper = require('@iqrok/serial.helper');
const serial = new serialHelper(
    port: '/dev/ttyUSB0',
    baud: 9600,

    // reconnect when connection is lost
    // if left undefined will be set to true
    autoreconnect: true,

    // interval, in millisecond, between reconnect attempt
    reconnectInterval: 3000, 

    // open port when creating instance 
    // if left undefined will be set to true
    autoopen: true,
);
```
npm package: @iqrok/shmop
Description: shm operation binding from cpp to nodejs
Author: iqrok
Latest version: 0.1.0

# shmop C binding

## Usage
```javascript
const shmop = require('@iqrok/shmop');
```
----
## Methods
### setPath(path)
- **Descriptions**
    set path to generate token with ftok()
- **Parameter(s)**
    - __path__ [*String*]
    path to existing file
----

### getToken(id, path = null)
- **Descriptions**
    generate token with ftok()
- **Parameter(s)**
    - __id__ [*Number*]
    number from 1 - 255. if 0 is passed as id, it will throw error
    - ___path___ (_optional_)
    use path defined via this parameter instead of global path defined via __setPath()__
- **Return**
    [*Number*] generated token
----
    
### read(id, type)
- **Descriptions**
    read shared memory block pointed by the provided token
- **Parameter(s)**
    - __id__ [*Number*]
    if __id__ <= 255, then it will be passed to __getToken()__, otherwise it will be treated as the token
    - __type__ [*String*]
    data type that will be read 
- **Return**
    [*Number*] Read shared memory
----

### write(id, value, type)
- **Descriptions**
    read shared memory block pointed by the provided token
- **Parameter(s)**
    - __id__ [*Number*]
    if __id__ <= 255, then it will be passed to __getToken()__, otherwise it will be treated as the token
    - __value__ [*Number*]
    value that will be written to shared memory block 
    - __type__ [*String*]
    data type that will be read 
- **Return**
    [*Number*] Read shared memory
----
## Valid Data Types
|Type|Description|
|---|---|
|**uint8**|8-bit unsigned integer|
|**int8**|8-bit signed integer|
|**uint16**|16-bit unsigned integer|
|**int16**|16-bit signed integer|
|**uint32**|32-bit unsigned integer|
|**int32**|32-bit signed integer|
|**float**|32-bit single precision floating number|
|**double**|64-bit double precision floating number|
npm package: @iqrok/shmopthread
Description: shared memory binding for shmop and mmap
Author: iqrok
Latest version: 0.0.3-alpha

# @iqrok/ShmopThread

```javascript
const {
		ShmopThread,
		Constant,
		Datatype,
	} = require('@iqrok/ShmopThread');

const {
		O_FLAG,
		DIRECTION,
		PROTECTION
	} = Constant;

const pShm = new ShmopThread();
pShm.config({
			fname: 'shm-out.tmp',
			flag: O_FLAG.CREAT | O_FLAG.CREAT,
			mode: 0o777,
			direction: DIRECTION.READ,
			protection: PROTECTION.READ,
			period: 25000, // in us
			alignByte: true,
		})
	.setData([
			pShm.construct('uint8', Datatype.UInt8),
			pShm.construct('int16', Datatype.Int16),
			pShm.construct('double', Datatype.Float64),
			pShm.construct('int32', Datatype.Int32),
			pShm.construct('float', Datatype.Float32),
		])
	.init();

setInterval(() => {
	const buffer = pShm.read();
	const values = pShm.readStruct(buffer);
	console.log(values);
}, 25)

const pShm2 = new ShmopThread();
pShm2.setFileName('shm-in.tmp');
pShm2.setFlag(O_FLAG.CREAT | O_FLAG.RDWR);
pShm2.setMode(0o777);
pShm2.setDirection(DIRECTION.WRITE);
pShm2.setProtection(PROTECTION.WRITE | PROTECTION.READ);
pShm2.setPeriod(25000);
pShm2.setData([
			pShm.construct('uint8', Datatype.UInt8),
			pShm.construct('int16', Datatype.Int16),
			pShm.construct('double', Datatype.Float64),
			pShm.construct('int32', Datatype.Int32),
			pShm.construct('float', Datatype.Float32),
		]);
pShm2.init();

setInterval(() => {
	const values = pShm.values;
	pShm2.writeStruct(values);
}, 25);
```
npm package: @iqss/dataverse-client-javascript
Description: Dataverse API wrapper package for JavaScript/TypeScript-based applications
Author: Tai Nguyen Bui
Latest version: 2.1.0

## Dataverse JavaScript Client

![NPM Version](https://img.shields.io/npm/v/%40iqss%2Fdataverse-client-javascript)

The Dataverse JavaScript Client is an open-source package that provides a set of use-case-driven functions to interact with the [Dataverse API](http://guides.dataverse.org/en/latest/api/). Designed around Domain-Driven Design (DDD) principles, this package offers a structured, high-level interface to perform actions like retrieving datasets, managing collections, uploading files, and more.

This package is part of the Dataverse Frontend ecosystem and is intended to be used by applications or services that integrate with the Dataverse platform.

## Features

- **Use case-centric API functions** – Organized around domain-specific actions like `getDataset`, `createCollection`, or `restrictFile`.
- **TypeScript-first** – All use cases include strong typings for inputs and outputs, improving developer experience.

## Installation

Install the package via npm:

```bash
npm install @iqss/dataverse-client-javascript
```

## Usage

```typescript
import { getDataset } from '@iqss/dataverse-client-javascript'

/* ... */

const datasetIdentifier = 'doi:10.77777/FK2/AAAAAA'
const datasetVersion = '1.0'

getDataset.execute(datasetIdentifier, datasetVersion).then((dataset: Dataset) => {
  /* ... */
})

/* ... */
```

For detailed information about available use cases see [Use Cases Docs](https://github.com/IQSS/dataverse-client-javascript/blob/main/docs/useCases.md).

For detailed information about usage see [Usage Docs](https://github.com/IQSS/dataverse-client-javascript/blob/main/docs/usage.md).

## Changelog

See [CHANGELOG.md](https://github.com/IQSS/dataverse-client-javascript/blob/main/CHANGELOG.md) for a detailed history of changes to this project.

## Contributing

Want to add a new use case or improve an existing one? Please check the [Contributing](https://github.com/IQSS/dataverse-client-javascript/blob/main/CONTRIBUTING.md) section.

## License

This project is open source and available under the [MIT License](https://github.com/IQSS/dataverse-client-javascript/blob/main/LICENSE).
npm package: @iqtech84/capacitor-plugin-zip
Description: Zip or Unzip content
Author: Iqbal Osman
Latest version: 1.0.3

# capacitor-plugin-zip

Zip or Unzip (Android & iOS)

## Install

```bash
npm install @iqtech84/capacitor-plugin-zip
```

## Usage

```typescript
import { Zip } from '@iqtech84/capacitor-plugin-zip';

Zip.zip({
    source : source,
    destination: destination,
    password: 'password', // Optional
});

Zip.unZip({
    source : source,
    destination: destination,
    overwrite: true, // Optional default true
    password: 'password', // Optional
});

Zip.addListener('progress', (r) => {
    var progress = r.progress;
    var completed = r.completed; // true or false  
})

```

### Interfaces

#### ZipOptions

| Prop              | Type                 |
| ----------------- | -------------------- |
| **`source`**      | <code>string</code>  |
| **`destination`** | <code>string</code>  |
| **`password`**    | <code>string</code>  |


#### UnZipOptions

| Prop              | Type                 |
| ----------------- | -------------------- |
| **`source`**      | <code>string</code>  |
| **`destination`** | <code>string</code>  |
| **`overwrite`**   | <code>boolean</code> |
| **`password`**    | <code>string</code>  |