open-index/open-npm huggingface dataset:
npm package: @nanogiants/firegration
Description: A CLI tool to migrate Firestore data using typed migrations
Author: NanoGiants GmbH
Latest version: 0.0.8

# Firegrations

Firegrations is a simple migration tool for Firestore. It allows you to define your migrations in code fully typed in Typescript and run them in a specific order.

## Installation

There are two operation modes of the migration tool. You can either use the CLI or the package as a library directly in your code.

If you solely want to use the CLI, you don't need to install this package. However, it is useful to install it for type information. You can use it directly from npx.

```sh
npx @nanogiants/firegration --migrations=./your-migrations-folder
```

For library usage, you can install the package from npm:

```sh
npm install @nanogiants/firegration
```

You also need Firebase Credentials in both modes to run the migrations. Simply set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable when running the migrations.

## Usage

### Write your migrations

You can write your migrations in a folder of your choice in Typescript. Each migration should be a separate file that exports a function that takes a Firestore instance as an argument. The naming scheme must satisfy the following regex: `v{semver}__{description}`.

You can either export a default anonymous function or export a named function `migrate`:

```ts
// migrations/v1.0.0__migration1.ts
import { MigrationParameters } from "@nanogiants/firegration";
export default async function ({ firestore }: MigrationParameters) {
  // Your migration code here
}
```

```ts
// migrations/v1.0.1__migration2.ts
import { MigrationParameters } from "@nanogiants/firegration";
export async function migrate({ firestore }: MigrationParameters) {
  // Your migration code here
}
```

### Run your migrations

You can run your migrations using the CLI or the library.

#### CLI

```sh
GOOGLE_APPLICATION_CREDENTIALS="service_account.json" npx @nanogiants/firegration --migrations=./migrations
```

#### Library

```ts
// index.js
import { runMigrations } from "@nanogiants/firegration";

runMigrations({
  migrations: "./migrations",
});
```

```sh
GOOGLE_APPLICATION_CREDENTIALS="service_account.json" node index.js
```

### CLI Parameters

```sh
Usage: @nanogiants/firegration [options]

Options:
  --migrations <path>              Path to migrations folder
  --migrationsCollection <string>  Name of migrations collection (default: "firegration")
  --databaseId <string>            Id of firestore database to use
  --tsconfig <path>                Path to tsconfig file
  -V, --version                    output the version number
  -h, --help                       display help for command
```

## Examples

You can find examples of how to use Firegration in the [examples](./examples) folder.
npm package: @nanogiants/nestjs-swagger-api-exception-decorator
Description: NestJS Swagger decorator for API exceptions
Author: NanoGiants GmbH
Latest version: 1.7.2

# NestJS Swagger API Exception Decorator

[![Node.js CI](https://github.com/nanogiants/nestjs-swagger-api-exception-decorator/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/nanogiants/nestjs-swagger-api-exception-decorator/workflows/Node.js%20CI)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanogiants_nestjs-swagger-api-exception-decorator&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanogiants_nestjs-swagger-api-exception-decorator)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=nanogiants_nestjs-swagger-api-exception-decorator&metric=coverage)](https://sonarcloud.io/dashboard?id=nanogiants_nestjs-swagger-api-exception-decorator)
[![npm](https://img.shields.io/npm/v/@nanogiants/nestjs-swagger-api-exception-decorator)](https://www.npmjs.com/package/@nanogiants/nestjs-swagger-api-exception-decorator)
[![npm downloads](https://img.shields.io/npm/dw/@nanogiants/nestjs-swagger-api-exception-decorator)](https://www.npmjs.com/package/@nanogiants/nestjs-swagger-api-exception-decorator)

## Description

[NestJS Swagger](https://docs.nestjs.com/openapi/introduction) decorator for API exceptions.

## Installation

```sh
$ npm i @nanogiants/nestjs-swagger-api-exception-decorator
```

## Example

```typescript
import { ApiException } from '@nanogiants/nestjs-swagger-api-exception-decorator';

@ApiException(() => UnauthorizedException)
export class Controller {
  @ApiOperation({ summary: 'Changes the users password' })
  @ApiException(() => [PasswordsDidNotMatchException, OldAndNewPasswordMatchException, CredentialsNotValidException])
  @Patch('/password')
  async changeUserPassword(@Res() res: Response): Promise<void> {
    return res.sendStatus(HttpStatus.OK);
  }
}
```

## Getting Started

Please visit our [documentation](https://nanogiants.github.io/nestjs-swagger-api-exception-decorator/) to get started.

## Release Notes

Please visit the [Release Notes](https://nanogiants.github.io/nestjs-swagger-api-exception-decorator/releasenotes/v1.5.0) in our documentation for major and minor releases. Patch releases are documentated in [GitHub Releases](https://github.com/nanogiants/nestjs-swagger-api-exception-decorator/releases).
npm package: @nanogiants/repository-setup
Description: Sets up new NanoGiants repositories including LICENSE, CoC and contribution guidelines
Author: NanoGiants GmbH
Latest version: 1.0.4

# NanoGiants Repository Setup

This project helps setting up the necessary Open Source related markdown files according to our default CODE_OF_CONDUCT and CONTRIBUTING (guidelines). It also includes generation of LICENSE file, either with our default license (MIT) or any other you want.

## Setup

### Installation

```bash
npm install -g @nanogiants/repository-setup
```

Then run:

```bash
ng-repo-setup
```

### Without installation

Just run this module with npx:

```bash
npx --package=@nanogiants/repository-setup ng-repo-setup
```

Then answer the questions in your console. After the required files have been generated, you may edit the TODO comments in the generated Code of Conduct and Contributing files.

## Templates

The templates are based on the templates of the [`contributing-gen`](https://www.npmjs.com/package/contributing-gen) npm module: https://github.com/bttger/contributing-gen/tree/master/templates
npm package: @nanogiants/vue3-longpress
Description: This package contains a Vue 3 directive which adds the `@longpress` event to an element.
Author: NanoGiants GmbH
Latest version: 1.0.8


# vue3-longpress
This package contains a Vue 3 directive which adds the `@longpress` event to an element.

## Installation

```bash
npm i @nanogiants/vue3-longpress
# or
yarn add @nanogiants/vue3-longpress
```

## Usage

```ts
// main.ts file
import { vLongpress } from '@nanogiants/vue3-longpress';
import App from './App.vue';

const app = createApp(App);
app.directive('use-longpress', vLongpress);


// component.ts
<template>
  <div>
    <div v-use-longpress="500" @longpress="onLongpress">Hello World!</div>
    <div v-use-longpress @longpress="onLongpress">Hello World!</div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
  setup() {
    const onLongpress = (e: CustomEvent) => {
      console.log('onLongpress', e);
    };
    return { onLongpress };
  },
});
</script>
```

## args

There is only one arg you can pass.  
The duration can be set as an interger in ms. Default is 500. 
```ts
<div v-use-longpress="1000" @longpress="onLongpress"></div>
```


## License

[MIT](https://github.com/nanogiants/vue3-packages/blob/main/LICENSE.md)
npm package: @nanogiants/vue3-sanitize-html
Description: This package contains a Vue 3 directive which adds v-sanitize-html to an element.
Author: NanoGiants GmbH
Latest version: 1.0.5


# vue3-sanitize-html
This package contains a Vue 3 directive which adds v-sanitize-html to an element. 

## Installation

```bash
npm i sanitize-html
npm i @nanogiants/vue3-sanitize-html
#optional
npm i @types/sanitize-html -D
# or
yarn add sanitize-html
yarn add @nanogiants/vue3-sanitize-html
# optional
yarn add @types/sanitize-html -D
```

## Usage

#### **`main.ts`**
```ts
import { vSanitizeHtml } from '@nanogiants/vue3-sanitize-html';
import App from './App.vue';

const app = createApp(App);
app.directive('sanitize-html', vSanitizeHtml);
```

#### **`component.vue`**
```ts
<template>
  <div v-sanitize-html="{ html }">test</div>
</template>

<script setup lang="ts">
const html = '<div><span>Test</span><img src="X" onerror="alert(document.domain)"></div>';
</script>
```

#### **`component.vue`** with options
```ts
<template>
  <div v-sanitize-html="{ html, options }">test</div>
</template>

<script setup lang="ts">
import sanitize from 'sanitize-html';

const html = '<div><span>Test</span><img src="X" onerror="alert(document.domain)"></div>';
const options: sanitize.IOptions = {
  allowedTags: [],
};
</script>
```


## args

| arg         | type                                          |
| ----------- | --------------------------------------------- |
| value       | { html: string, options?: sanitize.IOptions } |


```ts
import sanitize from 'sanitize-html';

const html = '<div>Hello World</div>';
const options: sanitize.IOptions = {
  allowedTags: [],
};

<div v-sanitize-html="{ html, options}"></div>
```


## License

[MIT](https://github.com/nanogiants/vue3-packages/blob/main/LICENSE.md)
npm package: @nanogiants/vue3-visible
Description: This package contains a Vue 3 directive which adds v-visible.   It differs from `v-if` (not in the DOM) and `v-show` (display: none) by that it sets the elements `visibility` style to `hidden`.
Author: NanoGiants GmbH
Latest version: 1.0.8


# vue3-visible
This package contains a Vue 3 directive which adds v-visible.  
It differs from `v-if` (not in the DOM) and `v-show` (display: none) by that it sets the elements `visibility` style to `hidden`.

## Installation

```bash
npm i @nanogiants/vue3-visible
# or
yarn add @nanogiants/vue3-visible
```

## Usage

```ts
// main.ts file
import { vVisible } from '@nanogiants/vue3-visible';
import App from './App.vue';

const app = createApp(App);
app.directive('visible', vVisible);


// component.ts
<template>
  <div>
    <div v-visible="true">Hello World!</div>
    <div v-visible="false">Hello World!</div> // now has style `visibility: hidden`
  </div>
</template>
```

## args

There is only one arg you can pass.  
The boolean value if the element is visible. 



## License

[MIT](https://github.com/nanogiants/vue3-packages/blob/main/LICENSE.md)
npm package: @nanokit/router
Description: <p align="center">   <h1 align="center"><code>@nanokit/router</code></h1>   <h4 align="center">Router for React dashboards</h4> </p>
Latest version: 0.0.13

<p align="center">
  <h1 align="center"><code>@nanokit/router</code></h1>
  <h4 align="center">Router for React dashboards</h4>
</p>

## Introduction

This is a blueprint for a router for React dashboards.
npm package: @nanoko/kotoba
Description: The Nanoko lightweight express framework used for backend services and Nanoko!
Author: Nanoko Dev
Latest version: 1.0.2

# @nanoko/kotoba
## The Nanoko lightweight express framework used for backend services and Nanoko!

```ts
const { Kotoba } = require("@nanoko/kotoba");
const kotoba = new Kotoba(3000);
kotoba
  .store("views", "some view")
  .createRequest({
    method: "get",
    route: "/post/:id",
    callback: (req, response) => {
      const id = "test";
      const res = kotoba.setRequestAndResponse(req, response);
      res.getParam("id")
        .then((data) => {
          if (data == id) {
            res.getBody("post")
              .then((p) => {
                response.json(JSON.stringify({ post: p.info }));
              })
              .catch((err) => {
                response.status(400).send(err.message);
              })
          }
        })
    }
  })

  .startApp(`Connected and online at ${kotoba.getPort}`);
```
npm package: @nanolier/volta-to-mise-migrator
Description: A CLI tool to migrate Volta configuration in package.json to Mise .toml format
Author: Nanolier
Latest version: 1.0.0

# volta-to-mise-migrator

A CLI tool to migrate Volta configuration in package.json to Mise .toml format.

## Features

- Recursively scans directories for package.json files with Volta configuration
- Converts Volta settings to Mise .toml format
- Intelligently skips child directories with identical parent configurations
- Optionally removes Volta configuration from package.json files
- Excludes node_modules directories from scanning

## Usage

### Basic Usage (Dry Run)

Run the migration tool in the directory containing your package.json files. This will create mise.toml files but keep the Volta configuration in package.json:

```bash
npx @nanolier/volta-to-mise-migrator
```

### Remove Volta Configuration

To create mise.toml files and remove the Volta configuration from package.json:

```bash
npx @nanolier/volta-to-mise-migrator --remove-volta
```

## How It Works

1. **Scans Directories**: Recursively searches for all package.json files starting from the current directory (excluding node_modules)
2. **Detects Volta Config**: Identifies package.json files with Volta configuration
3. **Converts to Mise Format**: Creates mise.toml files with the equivalent Mise configuration
4. **Smart Deduplication**: Skips creating mise.toml in child directories if they have the same configuration as their parent
5. **Optional Cleanup**: Removes Volta configuration from package.json when --remove-volta flag is used

## Example

### Before Migration

**package.json**:

```json
{
  "name": "my-project",
  "volta": {
    "node": "20.10.0",
    "pnpm": "8.14.0"
  }
}
```

### After Migration

**mise.toml** (created):

```toml
[tools]
node = "20.10.0"
pnpm = "8.14.0"
```

**package.json** (with --remove-volta):

```json
{
  "name": "my-project"
}
```

## Supported Tools

- Node.js
- npm
- pnpm
- Yarn
npm package: @nanolink/bluetooth-core
Description: Core Bluetooth utilities: BleTag parsing, RSSI-to-distance, and helpers for Nanolink tags.
Author: Nanolink
Latest version: 0.1.6

# @nanolink/bluetooth-core

Core Bluetooth utilities for Nanolink tags: BleTag parsing, RSSI-to-distance, and small helpers.

## Install

Local workspace usage (monorepo): add a path alias or import directly via relative path. When published to a registry, install via npm.
npm package: @nanolink/operational-model
Description: TypeScript utility package.
Latest version: 0.1.30

# operational-model

TypeScript package providing read-only Aerospike repository interfaces and implementations for the tracker domain (states, links, RSSI, GPS, trips, etc.).

## Install

```bash
npm install @nanolink/operational-model
```

## Usage (read-only)

```ts
import {
	createAerospikeClient,
	createRepositories,
	AerospikeRepositories,
	AerospikeModels,
} from '@nanolink/operational-model';

async function main() {
	const client = await createAerospikeClient({
		hosts: '127.0.0.1:3000',
		namespace: 'test',
	});

	const repos = createRepositories({ client, namespace: 'test' });

	// States by device id
	const states: AerospikeModels.StatesWithId[] = await repos.states.getStates('device-123');

	// State links by receiver
	const links = await repos.stateLinks.queryByReceiver('receiver-1');

	// RSSI history for receiver@transmitter
	const rssi = await repos.rssi.queryByKey('receiver-1@tx-9');

	// GPS with derived speeds
	const gpsWithSpeed = await repos.gps.queryWithSpeed('device-123');

	// Stream without buffering the entire result set
	for await (const r of repos.rssi.streamAll()) {
		console.log(r);
	}

	console.log({ states, links, rssi, gpsWithSpeed });

	client.close();
}

main().catch((err) => {
	console.error(err);
	process.exit(1);
});
```

## Scripts
- Build: `npm run build`
- Test: `npm test`
- Lint: `npm run lint`
- Format: `npm run format`

## Notes
- The package is read-only: repository implementations do not perform writes or emit events.
- Uses msgpack for decoding embedded payloads; ensure Aerospike bins match the schema in `spec.md`.
- All repository implementations use TypeScript with direct imports from the `aerospike` npm package.
- Client configuration uses Aerospike's policies structure for timeout and retry settings.

## NATS subscription helper

The package also includes a NATS subscriber utility using msgpack decoding by default:

```ts
import { connect } from 'nats';
import { NatsSubscriber } from '@nanolink/operational-model';

async function listen() {
	const conn = await connect({ servers: 'nats://localhost:4222' });
	const sub = new NatsSubscriber<{ foo: string }>(conn, 'events');

	for await (const { topic, data } of sub.subscribeGenerator()) {
		console.log(topic, data);
	}
}

listen();
```
npm package: @nanolink/policy-common
Description: Aerospike policy access models and client helpers.
Latest version: 1.0.14

# @nanolink/policy-common

Aerospike policy access models plus a small read-only client and access resolver helpers.

## Install

```bash
npm install @nanolink/policy-common
```

## Scripts

- `npm run build` – compile to `dist`
- `npm test` / `npm run test:watch`
- `npm run lint`
- `npm start` – build then run `dist/index.js`

## Core exports

- Models and bin/set/key helpers under `src/models/*`
- `AerospikePolicyClient` – typed wrappers to read policy records
- `AccessResolver` – per-user helper to answer "does this user have access?" for references/trackers

## Example: client usage

```ts
import { AerospikePolicyClient, PolicyAccessLevel } from '@nanolink/policy-common';
import { ObjectId } from 'bson';

const client = new AerospikePolicyClient({ namespace: 'test', hosts: '127.0.0.1:3000' });
await client.connect();

const groupAccess = await client.getGroupAccess(new ObjectId('64c...'), new ObjectId('64d...'));
if (groupAccess && groupAccess.accessLevel !== PolicyAccessLevel.None) {
  // user group can access this group
}

const pids = await client.getAccessibleTrackerPids(userGroupId, customerId);
// pids is a Set<string> of tracker PIDs
```

Notable client methods (all return `null` when missing):

- `getGroupAccess(userGroupId, groupId)`
- `getGroupReferenceAccess(referenceId, userGroupId)`
- `getUserReferenceAccess(userId, referenceId)`
- `getReferenceGroup(referenceId)`
- `getTrackerGroup(pid)`
- `getTrackerGroupByVid(vid)`
- `query...` helpers for bulk reads (group access, reference groups, trackers by owner)
- `getAccessibleTrackerPids(userGroupId, customerId)` – union of tracker PIDs owned by the user group or customer

## Example: access resolution

`AccessResolver` assumes a single user group id for the user.

```ts
import { AccessResolver } from '@nanolink/policy-common';
import { ObjectId } from 'bson';

const resolver = new AccessResolver(client, userId, userGroupId);

const refAccess = await resolver.userHasReferenceAccess(referenceId);
// refAccess.hasAccess -> boolean, includes reason and access level

const trackerAccess = await resolver.userHasTrackerAccessByPid('tracker-pid-123');
```

Resolution order:
1) Direct user->reference allow
2) User group -> reference allow
3) Reference -> owning group, then user group access to that group
Trackers: if unbound to a reference, they are allowed; otherwise defer to reference access.

## Structure

- `src/models/*` – interfaces and bin/set/key helpers
- `src/aerospikeClient.ts` – typed Aerospike read client
- `src/accessResolver.ts` – access resolution helper
- `src/index.ts` – public entry point

## Publishing

GitHub Actions workflow `publish.yml` can publish to npm on push/dispatch when configured with `NODE_AUTH_TOKEN`.
npm package: @nanolink/signing-client
Description: TypeScript Node.js client for the Signing Service API
Latest version: 0.1.7

# @nanolink/signing-client

TypeScript npm package for interacting with the Signing Service API that issues RS256 JWTs and publishes JWKS.

## Install

```bash
npm install @nanolink/signing-client
```

## Usage

```ts
import { SigningClient } from "@nanolink/signing-client";

const client = new SigningClient({ baseUrl: "http://localhost:8080" });

const health = await client.healthz();
const signed = await client.sign({
  sub: "device-42",
  kind: "access",
  aud: ["api.example.com"],
  ttl_seconds: 3600,
  claims: { tid: "tenant-acme", ver: 3 }
});
const jwks = await client.getJwks();
const publicKeyPem = await client.getPublicKeyPem();
```

## Base URL

- Default: `http://localhost:8080`
- Override with `new SigningClient({ baseUrl: "..." })`

## API

- `healthz()` -> `{ status: "ok" }`
- `sign(request)` -> `{ token: string }`
- `getJwks()` -> `{ keys: Jwk[] }`
- `getPublicKeyPem(kid?)` -> `string` (SPKI PEM public key)

### `sign(request)` payload

```ts
type TokenKind = "access" | "service" | "password_reset" | "2fa";

interface SignRequest {
  sub: string;                 // required, non-empty
  kind: TokenKind;             // required
  aud?: string[];              // optional
  ttl_seconds?: number;        // optional, positive integer
  claims?: Record<string, unknown>; // optional (reserved names rejected)
}
```

Reserved claim names in `claims` (rejected): `iss`, `sub`, `aud`, `iat`, `exp`, `kind`.

### `getJwks()` response

```ts
interface JwksResponse {
  keys: Array<{
    kty: "RSA";
    use: "sig";
    alg: "RS256";
    kid: string;
    n: string;
    e: string;
  }>;
}
```

## Error handling

All non-2xx responses throw `SigningClientError` with:

- `status`: HTTP status code
- `message`: value from service error JSON (`{ "error": "..." }`) when present
- `body`: response payload when available
npm package: @nanomatic/ds3231
Description: RTC DS3231 implementation for the Raspberry PI 4 + temperature reading 🌡
Author: NANOmatic
Latest version: 3.0.2

<p align="center">
  <a href="" rel="noopener">
  <img src="https://kamami.pl/11194-large_default/rpi-raspberry-pi-rtc-ds3231-modul-zegara-rtc-dla-raspberry-pi.jpg" alt="FSM"></a>
</p>
<h3 align="center">@nanomatic/ds3231</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    RTC DS3231 implementation for the Raspberry PI 4 + temperature reading 🌡
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [📦 Dependencies](#-dependencies)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/ds3231
```

### Using

Example code below:

```js
import { DS3231 } from '@nanomatic/ds3231'

const RTC = new DS3231;

// Writting system time to the DS3231
RTC.set(new Date());

// Reading time from the DS3231
setInterval(() => console.log(`${RTC.get().toString()}  ${RTC.getTemperature()} °C`), 500);
```

## ⛏️ Built With <a name = "tech_stack"></a>
- [@types/rpio](https://www.npmjs.com/package/rpio) - Type definitions for the Raspberry I/O library
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## 📦 Dependencies
- [rpio](https://www.npmjs.com/package/rpio) - Raspberry I/O library

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Łukasz & Sebastian for working together and giving ideas 😉
npm package: @nanomatic/interpreter
Description: Interpreter implementation
Author: NANOmatic
Latest version: 1.0.1

<p align="center">
  <a href="" rel="noopener">
  <img src="https://online.visual-paradigm.com/repository/images/af11e57b-928d-4135-9dbd-82859dbe0598.png" height="200" alt="Interpreter"></a>
</p>
<h3 align="center">@nanomatic/interpreter</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    Interpreter implementation
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/interpreter
```

### Using

Example code below:

```js
import { Interpreter } from '@nanomatic/interpreter';

const variables: any = {
    memory: {
        pi: Math.PI,
        r: 2
    }
};

const interpreter = new Interpreter(variables, '|', (_: string, data: any[]) => data[1]);

const value = interpreter.parse('memory|result|surface = memory|pi * memory|r ** 2');

console.log(`π * r² = π * 2² = ${value}`);

// The same as bellow example
console.log(`π * r² = π * 2² = ${variables.memory.result.surface}`);
```

## ⛏️ Built With <a name = "tech_stack"></a>

- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Sebastian for working together and giving ideas 😉
npm package: @nanomatic/math
Description: Implementation of the mathematics terms
Author: NANOmatic
Latest version: 1.0.0

<p align="center">
  <a href="" rel="noopener">
  <img src="https://3.files.edl.io/74de/18/08/29/202337-d8d1e173-0d95-4efd-bcea-1ae936503655.png" height="200" alt="Math library"></a>
</p>
<h3 align="center">@nanomatic/math</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    Implementation of the mathematics utils.
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/math
```

### Using

Example code below:

```ts
import { Filter, Diff, Integral } from '@nanomatic/math';

//  Filter
const filter = new Filter(.002);

filter.alpha = .4;

const value = 100;

console.log(filter.calc(value));
console.log(filter.calc(value));
console.log(filter.calc(value));
console.log(filter.calc(value));

filter.clear();

// Diff
const diff = new Diff;

console.log(diff.calc(5));
console.log(diff.calc(5));
console.log(diff.calc(0));

diff.clear();

// Integral
const integral = new Integral;

console.log(integral.calc(5));
console.log(integral.calc(5));
console.log(integral.calc(0));

integral.clear();
```

## ⛏️ Built With <a name = "tech_stack"></a>
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work
npm package: @nanomatic/mikrotik
Description: API for the MikroTik router
Author: NANOmatic
Latest version: 1.0.7

<p align="center">
  <a href="" rel="noopener">
  <img src="https://wicket.eu/wp-content/uploads/2016/01/Mikrotik_logo.png" height="200" alt="Mikrotik library"></a>
</p>
<h3 align="center">@nanomatic/mikrotik</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    API for the MikroTik router.
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [📦 Dependencies <a name = "dependencies"></a>](#-dependencies)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/mikrotik
```

### Using

Example code below:

```ts
import MikroTik from '@nanomatic/mikrotik';

try {
    new MikroTik('192.168.1.1', 'api_user', 'api_pass', {
        refreshTime: 5000,
        onRefresh: console.log
    });
} catch(error: any) {
    console.log(error);
}

// const router = new MikroTik('192.168.1.1', 'api_user', 'api_pass', {
//     refreshTime: 5000
// });

// setInterval(() => router.refresh().then(console.log), 1000);
```

## ⛏️ Built With <a name = "tech_stack"></a>
- [@types/node](https://www.npmjs.com/package/@types/node) - Type definitions for Node.js
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## 📦 Dependencies <a name = "dependencies"></a>
- [mikrotik](https://www.npmjs.com/package/mikrotik) - Full-Featured asynchronous Mikrotik API interface

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work
npm package: @nanomatic/mongodb
Description: Library that allows to manage MongoDB database
Author: NANOmatic
Latest version: 1.0.0

<p align="center">
  <a href="" rel="noopener">
  <img src="https://i1.wp.com/jsdn.pl/wp-content/uploads/2017/03/Podstawy-MongoDB.png?resize=768%2C208" height="100" alt="String to object"></a>
</p>
<h3 align="center">@nanomatic/mongodb</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    Library that allows to manage MongoDB database
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/mongodb
```

### Using

Example code below:

```js
import { MongoDB } from '@nanomatic/mongodb';

const db = 'db';
const collection = 'test';

// tslint:disable-next-line: no-console
const showDocuments = async(mongoDB: MongoDB) => console.log(await mongoDB.getDocuments(db, collection));

new MongoDB('localhost', 27017, async(mongoDB: MongoDB) => {
    try {
        // Clear database
        await mongoDB.removeDocuments(db, collection);

        await mongoDB.insertDocument(db, collection, { vehicle: '🚑'});
        await mongoDB.insertDocument(db, collection, { vehicle: '🚒'});
        await showDocuments(mongoDB);

        await mongoDB.updateDocuments(db, collection, { vehicle: '🚑'}, { vehicle: '🚓'});
        await mongoDB.removeDocuments(db, collection, { vehicle: '🚒'});
        await showDocuments(mongoDB);
    } catch {
        // tslint:disable-next-line: no-console
        console.log('😥');
    }
});
```

## ⛏️ Built With <a name = "tech_stack"></a>

- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Sebastian for working together and giving ideas 😉
npm package: @nanomatic/ncp5623b
Description: RGB LED driver via I²C (NCP5623B) for the Raspberry PI 4 on Linux Ubuntu
Author: NANOmatic
Latest version: 2.0.5

<p align="center">
  <a href="" rel="noopener">
  <img src="https://www.mikroe.com/img/cms/rgb-driver-click-inside-image%20(1).jpg" alt="NCP5623B"></a>
</p>
<h3 align="center">@nanomatic/ncp5623b</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    RGB LED driver via I²C (NCP5623B) for the Raspberry PI 4 on Linux Ubuntu.
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [📦 Dependencies](#-dependencies)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/ncp5623b
```

### Using

Example code below:

```js
import { NCP5623B } from '@nanomatic/ncp5623b'

// Create new NCP5623B object
const led = new NCP5623B;

const random = () => Math.floor(Math.random() * 101);

/*
    Setting gamma correction. Values:
    g < 0   forbidden
    g = 0   max
    g < 1   brighter
    g = 1   linear
    g > 1   darker
*/
// led.setGamma('r', 1);
led.setGamma('g', 2.5);
// led.setGamma('b', 1);

// console.log(led.getGamma());

// Set random color every 500ms
setInterval(() => led.set(random(), random(), random()), 500);

// Change color in interval
// let i = 0;
// setInterval(() => led.set(0, 0, i++ % 100), 20);
```

## ⛏️ Built With <a name = "tech_stack"></a>
- [@types/rpio](https://www.npmjs.com/package/@types/rpio) - Type definitions for the Raspberry I/O library
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## 📦 Dependencies
- [rpio](https://www.npmjs.com/package/rpio) - Raspberry I/O library

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Łukasz for working together and giving ideas 😉
npm package: @nanomatic/object_filter
Description: Library that allows filtering the object by passed regular expressions
Author: NANOmatic
Latest version: 1.0.1

<p align="center">
  <a href="" rel="noopener">
  <img src="https://i.dlpng.com/static/png/5460629-filter-png-88-images-in-collection-page-1-filter-png-2000_2016_preview.png" height="150" alt="Object filter"></a>
</p>
<h3 align="center">@nanomatic/object_filter</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)

</div>

---

<p align="center">
    Library that allows filtering the object by passed regular expressions
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/object_filter
```

### Using

Example code below:

```js
import { getArray, getObject } from '@nanomatic/object_filter';

const salary = {
    Bill: 1350,
    Jackson: 1270,
    Jenny: 1100,
    Jhon: 1200,
    Joseph: 1500
};

const array = getArray(salary, /^J/);
const object = getObject(salary, /^B/);

const sum = array.reduce((sum: number, salary: number) => sum + salary, 0);

console.log(`Sum salary for all J's persons: 💲${sum}`);
console.log(`Jenny salary: 💲${object.Jeny || '?'}`);
console.log(`Bill salary: 💲${object.Bill || '?'}`);
```

## ⛏️ Built With <a name = "tech_stack"></a>

- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Sebastian for working together and giving ideas 😉