open-index/open-npm huggingface dataset:
npm package: @marianmeres/boolean-store
Description: Tiny DRY [store](https://github.com/marianmeres/store) utility for a boolean flag along with optional data.
Author: Marian Meres
Latest version: 1.1.1

# @marianmeres/switch-store

Tiny DRY [store](https://github.com/marianmeres/store) utility for a boolean flag along with optional data.

## Install

```shell
$ npm i @marianmeres/switch-store
```

## Basic example

```javascript
const sidebar = createSwitchStore(false, { component: Foo } /* whatever */);

// "open" and "close" are aliases to "on" and "off"

sidebar.subscribe((value) => {
	// value -> {
	//     isOn: false,
	//     isOff: true,
	//     isOpen: false,
	//     isClosed: true,
	//     data: { component: Foo }
	// }
});

// api
store.subscribe((value) => ...)
store.on(data?); // or open
store.off(data?); // or close
store.toggle();

```

Using Svelte here just as an example of consuming the store. The store itself
is not dependant on Svelte (just compatible).

```sveltehtml
{#if $sidebar.isOpen}
    <Sidebar>
        <svelte:component this={$sidebar.data.component} />
    </Sidebar>
{/if}

<button on:click={sidebar.toggle}>Toggle Foo sidebar</button>

<button on:click={() => sidebar.open({ component: Bar })}>
    Bar sidebar
</button>
```
npm package: @marianmeres/emoji-fns
Description: Emoji svgs wrapped as functions.
Author: Marian Meres
Latest version: 1.0.2

# @marianmeres/emoji-fns

[Twemoji](https://twemoji.twitter.com/) and 
[Openmoji](https://openmoji.org/) emoji svgs wrapped as functions with customization 
arguments returning svg string. Each icon function lives in a separate file and is typed. 
Note that only default skin-tone is provided.

It's worth emphasizing, that all credit (and copyright) belongs to:
- [Twemoji](https://twemoji.twitter.com/)
- [Openmoji](https://openmoji.org/)

Thanks for the amazing work.

## Install
```shell
npm i @marianmeres/emoji-fns
```

## Usage

[Twemoji](https://twemoji.twitter.com/) are prefixed with `twemoji` 
and [Openmoji](https://openmoji.org/) with `openmoji`.

Signature for all functions is:

```typescript
prefixEmojiName(cls?: string, size?: number, style?: string): string;
```

Where emoji names are build from `CLDR Short Name` data from
https://unicode.org/emoji/charts/full-emoji-list.html

So the actual usage example may look like:

```javascript
import { twemojiAlarmClock } from "@marianmeres/emoji-fns";

// all arguments are optional and size defaults to original (twemoji 36, openmoji 72)
const svg = twemojiAlarmClock('inline-block', 32, "margin: 10px;");

// svg now contains:
// <svg class='inline-block' width="32" height="32" style="margin: 10px;" ... >...</svg>
```

All functions are typed, so your IDE intellisense should work.

## Related
- https://github.com/marianmeres/emoji-list
- https://github.com/marianmeres/icons-fns
npm package: @marianmeres/emoji-list
Description: Search emojis by name.
Author: Marian Meres
Latest version: 1.2.1

# @marianmeres/emoji-list

List of emojis (data from https://unicode.org/emoji/charts/full-emoji-list.html)
compiled into javascript plain object maps. Useful as low level helpers for various 
emoji processing tools.

NOTE: only default skin-tone

## key to hex
```javascript
import { emojiKeyMap } from '@marianmeres/emoji-list';

// emojiKeyMap contains full key-to-hex map of all emojis
{
    "grinningFace": "1f600",
    // ... ~1870 records omitted here
    "flagWales": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f"
}
```

## hex to key
```javascript
import { emojiCodeMap } from '@marianmeres/emoji-list';

// emojiCodeMap contains full hex-to-key map of all emojis
{
    "1f600": "grinningFace",
    // ... ~1870 records omitted here
    "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f": "flagWales"
}
```

## groups map (both major and minor)
```javascript
import { emojiKeyToGroupMap, emojiGroupToKeyMap } from '@marianmeres/emoji-list';

// emojiKeyToGroupMap contains full key-to-groups [major, minor] map
{
    "grinningFace": [ "smileys and emotion", "face-smiling" ],
    // ... ~1870 records omitted here
    "flagWales": [ "flags", "subdivision-flag" ]
}

// emojiGroupToKeyMap contains full group-to-key map
{
    // major group
    "smileys and emotion": [ "grinningFace", /*...*/ ],
    // ...
	
    // major/minor group
    "smileys and emotion/face-smiling": [ "grinningFace", /*...*/ ],
    // ...
}
```

## text description
```javascript
import { emojiFulltextMap } from '@marianmeres/emoji-list';

// emojifulltextMap contains full key-to-text map of all emojis
{
    "grinningFace": "grinning face",
    // ... ~1870 records omitted here
    "flagWales": "flag: Wales"
}
```

## `emojiToKey` and `keyToEmoji` helpers
```javascript
import { emojiToKey, keyToEmoji } from '@marianmeres/emoji-list';

assert('pileOfPoo' === emojiToKey('💩'));
assert('💩' === keyToEmoji('pileOfPoo'));
```
npm package: @marianmeres/icons-fns
Description: Icon svgs wrapped as functions.
Author: Marian Meres
Latest version: 5.0.0

# @marianmeres/icons-fns

Icon svgs from various providers wrapped as functions (with props argument)
returning the icon svg string. Each icon function lives in a separate file and is typed.

All credit (and copyright) belongs to these icon providers:

- [Bootstrap icons](https://icons.getbootstrap.com/)
- [Boxicons](https://boxicons.com/)
- [Bytesize icons](https://danklammer.com/bytesize-icons/)
- [Feather icons](https://feathericons.com/)
- [Font Awesome Icons (Free)](https://fontawesome.com/icons)
- [Heroicons](https://heroicons.com/)
- [Phosphoricons](https://phosphoricons.com/)
- [Lucide icons](https://lucide.dev/)

Thanks for the amazing work.

## Install

```shell
npm i @marianmeres/icons-fns
```

## Usage

Each icon function is prefixed with the vendor name (and icon type where applicable):

- Bootstrap: `iconBs`
- Boxicons: `iconBx`
- Bytesize: `iconBytesizeRegular`, `iconBytesizeSolid`
- Feather: `iconFeather`
- Font Awesome Icons (Free): `iconFaRegular`, `iconFaSolid`
- Heroicons: `iconHeroMini`, `iconHeroOutline`, `iconHeroSolid`
- Phosphoricons: `iconPhBold`, `iconPhDuotone`, `iconPhFill`, `iconPhLight`, `iconPhRegular`, `iconPhThin`
- Lucide: `iconLucide`

Signature for all icon functions is:

```typescript
iconPrefixIconName(props?: Partial<{
    size: number;
    class: string;
    style: string;
    // stroke-width is supported only for "Feather", "Bytesize" and "Lucide"
    strokeWidth: number;
}>): string;

```

so the actual usage example may look like:

```javascript
import { iconHeroMiniAcademicCap } from '@marianmeres/icons-fns/heroicons/mini/iconHeroMiniAcademicCap.js';

const svg = iconHeroMiniAcademicCap({
	class: 'inline-block',
	size: 32,
	style: 'color: blue;',
});

// svg now contains:
// <svg class='inline-block' width="32" height="32" style="color: blue;" ... >...</svg>
```

All functions are typed, so your IDE should be able to typehint:

![IDE typehint screenshot](screenshots/screenshot-IDE.png)

## Related

- https://github.com/marianmeres/emoji-fns
npm package: @marianmeres/kv
Description: [![NPM version](https://img.shields.io/npm/v/@marianmeres/kv.svg)](https://www.npmjs.com/package/@marianmeres/kv) [![JSR version](https://jsr.io/badges/@marianmeres/kv)](https://jsr.io/@marianmeres/kv) [![License: MIT](https://img.shields.io/badge/License
Author: Marian Meres
Latest version: 1.3.2

# @marianmeres/kv

[![NPM version](https://img.shields.io/npm/v/@marianmeres/kv.svg)](https://www.npmjs.com/package/@marianmeres/kv)
[![JSR version](https://jsr.io/badges/@marianmeres/kv)](https://jsr.io/@marianmeres/kv)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Key-value storage abstraction layer with support for multiple backend adapters:
- redis 
- postgresql
- memory
- Deno KV (only in Deno runtime)

The API is inspired by the Redis API.

## Installation

```shell
deno add jsr:@marianmeres/kv
```

```shell
npm i @marianmeres/kv
```

## Usage

```typescript
import { createKVClient } from '@marianmeres/kv';

// Basic usage with memory adapter (default)
const client = createKVClient("my-app-namespace:");

// Or specify a different adapter type
const redisClient = createKVClient(
    "my-app-namespace:",
    'redis', // 'redis' | 'postgres' | 'deno-kv' | 'memory'
    { db: myRedisClient } // adapter-specific options
);

// Use the client
await client.set('my:foo:key', { my: "value" });
await client.get('my:foo:key'); // { my: "value" }
await client.keys('my:*'); // ['my:foo:key']
```

**Important**: Namespace must end with a colon (`:`) or be an empty string.

## API

```typescript
client.set(key: string, value: any, options?): Promise<boolean>
client.get(key: string): Promise<any>
client.delete(key: string): Promise<boolean>
client.exists(key: string): Promise<boolean>
client.keys(pattern: string): Promise<string[]>
client.clear(pattern: string): Promise<number>
client.setMultiple(keyValuePairs: [string, any][], options?): Promise<any[]>
client.getMultiple(keys: string[]): Promise<Record<string, any>>
client.transaction(operations: Operation[]): Promise<any[]>
client.expire(key: string, ttl: number): Promise<boolean>
client.ttl(key: string): Promise<Date | null | false>
```

## Adapter-Specific Limitations

### Deno KV
- **`delete()`**: Always returns `true`, even for non-existent keys (Deno.Kv limitation)
- **`expire()`**: Not supported - always returns `false`
- **`ttl()`**: Not supported - always returns `null`
- **Note**: TTL can be set during `set()` operation, but cannot be queried or modified after

### Redis
- **`keys()` and `clear()`**: Not supported in cluster mode (throws error)
- **Namespace**: Required (cannot be empty string)

### PostgreSQL
- Creates a table (default: `__kv`) in your database
- Supports optional TTL cleanup via `ttlCleanupIntervalSec` option

### Memory
- Data is not persisted (in-memory only)
- Supports optional TTL cleanup via `ttlCleanupIntervalSec` option

## Full API Reference

For complete API documentation including all methods, types, and adapter-specific options, see [API.md](API.md).

## License

[MIT](LICENSE)
npm package: @marianmeres/micperms
Description: [![NPM](https://img.shields.io/npm/v/@marianmeres/micperms)](https://www.npmjs.com/package/@marianmeres/micperms) [![JSR](https://jsr.io/badges/@marianmeres/micperms)](https://jsr.io/@marianmeres/micperms) [![License](https://img.shields.io/npm/l/@marianm
Author: Marian Meres
Latest version: 1.0.2

# @marianmeres/micperms

[![NPM](https://img.shields.io/npm/v/@marianmeres/micperms)](https://www.npmjs.com/package/@marianmeres/micperms)
[![JSR](https://jsr.io/badges/@marianmeres/micperms)](https://jsr.io/@marianmeres/micperms)
[![License](https://img.shields.io/npm/l/@marianmeres/micperms)](LICENSE)

Framework-agnostic microphone permission lifecycle manager. Detects platform
(browser, PWA, iOS/Android WebView), checks and requests permission, tracks state
reactively, and supports native bridge for opening app settings.

Does **not** own MediaStreams — when `getUserMedia` is called to probe permission,
all tracks are stopped immediately. Your app handles its own stream acquisition once
permission is `granted`.

## Installation

```bash
# Deno / JSR
deno add jsr:@marianmeres/micperms

# npm
npm install @marianmeres/micperms
```

## Usage

```typescript
import { createMicPerms } from "@marianmeres/micperms";

const mic = createMicPerms();

// Reactive subscription (Svelte $store compatible)
mic.subscribe((state) => {
    console.log(state.status);   // "unknown" | "prompt" | "granted" | "denied"
    console.log(state.platform); // "browser" | "pwa" | "ios-webview" | "android-webview"
});

// Check current permission (via Permissions API)
await mic.check();

// Request permission (via getUserMedia, tracks released immediately)
await mic.request();

// Smart recheck: query first, fall back to getUserMedia if ambiguous
await mic.recheck();

// Open native app settings (iOS/Android WebView only)
mic.openSettings();

// Cleanup
mic.destroy();
```

### Configuration

```typescript
const mic = createMicPerms({
    platform: "ios-webview",           // override auto-detection
    iosBridgeHandler: "openAppSettings",  // iOS bridge handler name
    androidBridgeObject: "Android",       // Android bridge object on window
    androidBridgeMethod: "openAppSettings",
    appResumedEvent: "app-resumed",       // event fired by native layer on return
    adapter: myCustomAdapter,             // injectable for testing
    logger: console,                      // default: noop
});
```

## API

See [API.md](API.md) for complete API documentation.

## License

[MIT](LICENSE)
npm package: @marianmeres/parse-boolean
Description: [![NPM version](https://img.shields.io/npm/v/@marianmeres/parse-boolean.svg)](https://www.npmjs.com/package/@marianmeres/parse-boolean) [![JSR version](https://jsr.io/badges/@marianmeres/parse-boolean)](https://jsr.io/@marianmeres/parse-boolean)
Author: Marian Meres
Latest version: 2.0.5

# @marianmeres/parse-boolean

[![NPM version](https://img.shields.io/npm/v/@marianmeres/parse-boolean.svg)](https://www.npmjs.com/package/@marianmeres/parse-boolean)
[![JSR version](https://jsr.io/badges/@marianmeres/parse-boolean)](https://jsr.io/@marianmeres/parse-boolean)

A little utility which parses any input to `boolean`. Almost as simple as `(v) => !!v`
except that it differently handles strings.

Only truthy strings are `true`, `t`, `yes`, `y`, `on`, `ok`, `enable`, `enabled` and
numeric ones except zero. All others are considered falsey. This dictionary can be globally
extended to your own needs. Case insensitive.

Mainly useful for string-to-boolean conversion from text config files, html form
values, or similar...

## Install

```sh
deno add jsr:@marianmeres/parse-boolean
```
```sh
npm install @marianmeres/parse-boolean
```

## Usage

```typescript
parseBoolean(value: any): boolean
```

## Examples

```javascript
parseBoolean('yEs'); // true
parseBoolean('ON'); // true
parseBoolean(''); // false
parseBoolean('foo'); // false
parseBoolean('-0.0'); // false
parseBoolean('{}'); // false
// all non-strings are casted as !!v
parseBoolean({}); // true
parseBoolean(NaN); // false
parseBoolean(123); // true
```

## Custom dictionary

You can extend the truthy dictionary with your own values:

```javascript
parseBoolean('yo'); // false
parseBoolean.addTruthy('yo');
parseBoolean('YO'); // true (case insensitive)
```

Reset the dictionary to remove all custom values:

```javascript
parseBoolean.addTruthy('custom');
parseBoolean('custom'); // true
parseBoolean.reset();
parseBoolean('custom'); // false
parseBoolean('yes'); // true (default values still work)
```

## API

### `parseBoolean(value: any): boolean`

Parses any input value to a boolean.

- **Non-string values**: Uses standard JavaScript truthy/falsy conversion (`!!value`)
- **Numeric strings**: Parsed as numbers (zero is false, non-zero is true)
- **String dictionary**: `"true"`, `"t"`, `"yes"`, `"y"`, `"on"`, `"ok"`, `"enable"`, `"enabled"` (case insensitive)
- **All other strings**: Considered falsy

### `parseBoolean.addTruthy(value: string): void`

Adds a custom string to the truthy dictionary. Values are normalized (lowercased and trimmed).

### `parseBoolean.reset(): void`

Resets the truthy dictionary to default values, removing all custom additions.

## Package Identity

- **Name:** @marianmeres/parse-boolean
- **Author:** Marian Meres
- **Repository:** https://github.com/marianmeres/parse-boolean
- **License:** MIT
npm package: @marianmeres/release
Description: Little helper script to automate releasing a new version tag.
Author: Marian Meres
Latest version: 1.1.2

# @marianmeres/release

Just a little helper script to automate package version bump fitting my needs.
Basically a wrapper of `npm version`, `git add`, `git commit` and `git tag`.

If specified, `npm version` is executed over multiple sub dirs.

The script will prompt you for confirmation, unless called with `--yes` arg.

## The workflow
1. do work
2. commit
3. call `npx release [-v major|minor|patch|x.y.z]` (default is `patch`)
4. confirm version change
5. `git push` && `git push origin vX.Y.Z` manually

## Todo

- Automate point 5. from the above as well (after prompt confirmation)

## Install and execute

```shell
# install
npm i -D @marianmeres/release

# and execute as node script directly
node ./node_modules/@marianmeres/release/release.js

# or as npm executable, via npx
npx @marianmeres/release
# or, if already installed, just
npx release

# to execute as package.json script, add to your package.json:
# ...
#  "scripts": {
#   ...
    "release": "release" # add args as needed
#  }
# ...
# and then run
npm run release
```

## Single dir mode

```shell
# Will +1 increase "patch" segment of current version (major.minor.patch).
# Current version is read from ./package.json
npx release

# Will set version and tag to "v1.2.3" regardless of current
npx release -v v1.2.3
```

## Multiple dirs mode

With multiple dirs, always the `{cwd}/package.json` is read as the significant one to be
bumped. All other dirs (specified via `-d`) are then synced accordingly.

```
.
├── .git
├── package.json
├── sub1
│   └── package.json
└── sub2
    └── package.json
```

```shell
npx release -d sub1 -d sub2
```
npm package: @marianmeres/selection-store
Description: Simple store utility for marking objects in collection as selected.
Author: Marian Meres
Latest version: 1.2.0

# @marianmeres/selection-store

Simple store utility for marking objects in collection as selected.

## Install

```shell
$ npm i @marianmeres/selection-store
```

## Example

```typescript
// factory
const store = createSelectionStore<T>(
    // initial collection of arbitrary objects
    items: T[] = [],  // e.g. [{ id: 'a' }, { id: 'b' }, { id: 'c' }],

    // initial set of selected indexes
    selected: number[] = [],

    // allow multiple selection flag
    multiple: boolean = false
);

//
store.subscribe((v) => {
    // full collection of objects
    // v.items: T[];

    // currently selected indexes
    // v.selected: number[];

    // current selection of objects (mapped indexes)
    // v.selection: T[];
});

// `resetSelected` flag empties the selection before applying the current one
// (makes sense only for multiple, since non multiple are always reset)
store.select(indexOrItem, resetSelected = true);
store.select([indexOrItem, indexOrItem2, ...], resetSelected = true);

// "unselect"
store.select([], resetSelected = true);
store.unselect(); // will unselect all
store.unselect(indexOrItem);
store.unselect([indexOrItem, indexOrItem2, ...]);

// helper to find index
store.findIndexBy(propName, propValue);
// for cases like:
store.select(store.findIndexBy('id', 'a'));

// resets selection and internal collection of objects
store.reset(items = []);
```
npm package: @marianmeres/store
Description: [![NPM version](https://img.shields.io/npm/v/@marianmeres/store.svg)](https://www.npmjs.com/package/@marianmeres/store) [![JSR version](https://jsr.io/badges/@marianmeres/store)](https://jsr.io/@marianmeres/store) [![License](https://img.shields.io/npm/l/
Author: Marian Meres
Latest version: 2.4.4

# @marianmeres/store

[![NPM version](https://img.shields.io/npm/v/@marianmeres/store.svg)](https://www.npmjs.com/package/@marianmeres/store)
[![JSR version](https://jsr.io/badges/@marianmeres/store)](https://jsr.io/@marianmeres/store)
[![License](https://img.shields.io/npm/l/@marianmeres/store)](LICENSE)

Lightweight reactive store implementation with subscriptions and persistence support.
Svelte store contract compatible.

**Features:**
- Reactive state management with subscriptions
- Derived stores for computed values (sync and async)
- Optional persistence to localStorage, sessionStorage, or memory
- TypeScript support with full type safety
- Zero dependencies (except pubsub)

## Install

```sh
deno add jsr:@marianmeres/store
```

```sh
npm install @marianmeres/store
```

## Quick Start

```typescript
import { createStore, createDerivedStore } from "@marianmeres/store";

// Create a writable store
const count = createStore(0);

// Subscribe to changes (callback is called immediately with current value)
const unsub = count.subscribe(val => console.log(val)); // logs: 0

// Update the store
count.set(1);              // logs: 1
count.update(n => n + 1);  // logs: 2

// Get current value without subscribing
console.log(count.get()); // 2

unsub(); // stop receiving updates
```

## Derived Stores

Create computed values from other stores:

```typescript
const firstName = createStore("John");
const lastName = createStore("Doe");

// Synchronous derivation
const fullName = createDerivedStore(
  [firstName, lastName],
  ([first, last]) => `${first} ${last}`
);

fullName.subscribe(console.log); // logs: "John Doe"
firstName.set("Jane");           // logs: "Jane Doe"
```

Asynchronous derivation (use the `set` callback):

```typescript
const search = createStore("");
const results = createDerivedStore([search], ([query], set) => {
  // Async operation
  fetchResults(query).then(data => set(data));
}, { initialValue: [] });
```

## Persistence

Automatically persist store values to storage:

```typescript
import { createStorageStore, createStoragePersistor, createStore } from "@marianmeres/store";

// Simple: auto-persisted store
const prefs = createStorageStore("preferences", "local", { theme: "dark" });
prefs.set({ theme: "light" }); // automatically saved to localStorage

// Advanced: manual persistor with error handling
const persistor = createStoragePersistor<number>("counter", "local");
const counter = createStore(persistor.get() ?? 0, {
  persist: persistor.set,
  onPersistError: (e) => console.error("Storage failed:", e)
});
```

Storage types: `"local"` (localStorage), `"session"` (sessionStorage), `"memory"` (in-memory Map).

## API

See [API.md](API.md) for complete API documentation.

## License

[MIT](LICENSE)
npm package: @marianmeres/svelte-qrcode
Description: [QR-Code-generator](https://github.com/nayuki/QR-Code-generator) wrapped as Svelte component.
Latest version: 1.0.1

# @marianmeres/svelte-qrcode

[QR-Code-generator](https://github.com/nayuki/QR-Code-generator) wrapped as Svelte component.

See [playground](https://qrcode.meres.sk) for more parameters.

## Installation

```ts
import QrCode from '@marianmeres/svelte-qrcode';
```

## Usage
```html
<QrCode content="this will be qr encoded as svg string" />
```

See [playground](https://qrcode.meres.sk) for more parameters.
npm package: @marianmeres/switch-store
Description: Tiny DRY [store](https://github.com/marianmeres/store) utility for a 3 state value (`true`, `false` and `undefined`) along with arbitrary data.
Author: Marian Meres
Latest version: 1.6.2

# @marianmeres/switch-store

Tiny DRY [store](https://github.com/marianmeres/store) utility for a 3 state
value (`true`, `false` and `undefined`) along with arbitrary data.

You can distinguish between falsey `false` and `undefined` states if you need to by checking
explicitly the `isUndefined` store prop. The `undefined` state is otherwise always evaluated as
`isOff` switch state.

## Install

```shell
$ npm i @marianmeres/switch-store
```

## Basic example

```javascript
const sidebar = createSwitchStore(false, { component: Foo } /* whatever */);

// "open" and "close" are aliases to "on" and "off"

sidebar.subscribe((value) => {
	// value -> {
	//     isOn: false,
	//     isOff: true,
	//     isUndefined: false,
	//     isOpen: false,
	//     isClosed: true,
	//     data: { component: Foo }
	// }
});

// api
store.subscribe((value) => ...)
store.on(data?); // or open
store.off(data?); // or close
store.unset(); // will set the internal flag to `undefined`
store.toggle();

```

Using Svelte here just as an example of consuming the store. The store itself
is not dependant on Svelte (just compatible).

```sveltehtml
{#if $sidebar.isOpen}
    <Sidebar>
        <svelte:component this={$sidebar.data.component} />
    </Sidebar>
{/if}

<button on:click={sidebar.toggle}>Toggle Foo sidebar</button>

<button on:click={() => sidebar.open({ component: Bar })}>
    Bar sidebar
</button>
```