open-index/open-npm huggingface dataset:
npm package: @fifv/vite-plugin-electron
Description: Electron 🔗 Vite
Author: Leo Wang
Latest version: 0.30.0

# vite-plugin-electron

[English](https://github.com/electron-vite/vite-plugin-electron/tree/main#readme) | 简体中文

- 感谢 [@ggdream](https://github.com/ggdream) 老师提供 `vite-plugin-electron` 的 npm 包名 ❤️
- 如果这个项目有帮到了你，作者很希望你能请客来一份下午茶 ٩(๑>◡<๑)۶

## 需要留神

- 🚨 默认情况下, `electron` 文件夹下的文件将会被构建到 `dist-electron`
- 🚨 目前, Electron 尚未支持 `"type": "module"`
- 🚨 通常的，Vite 可能不能正确的构建 Node.js 的包，尤其是 C/C++ 原生模块，但是 Vite 可以将它们以外部包的形式加载。所以，请将 Node.js 包放到 `dependencies` 中。除非你知道如何用 Vite 正确的构建它们。
  ```js
  electron({
    entry: 'electron/main.ts',
    vite: {
      build: {
        rollupOptions: {
          // Here are some C/C++ modules them can't be built properly.
          external: [
            'serialport',
            'sqlite3',
          ],
        },
      },
    },
  }),
  ```

## 🍵 🍰 🍣 🍟

<img width="270" src="https://github.com/caoxiemeihao/blog/blob/main/assets/$qrcode/$.png?raw=true">
npm package: @fig/complete-oclif
Description: Generate Fig completion spec from oclif
Author: Matt Schrage @mattschrage
Latest version: 2.0.1

# Fig // oclif CLI

This Javascript package is Fig's integration with popular CLI framework [Oclif](https://oclif.io/).

See Fig's docs for how to integrate: [https://fig.io/docs/guides/autocomplete-for-teams/oclif](https://fig.io/docs/guides/autocomplete-for-teams/oclif)
npm package: @fig/lezer-bash
Description: Lezer-based Bash grammar
Author: Sean Sullivan
Latest version: 1.2.5

# @fig/lezer-bash

This is a Bash grammar for the Lezer parser system.

The grammar closely follows the official [Shell Command Language
Specification](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html)

Most of the names used in the Lezer grammar are the same as the names used in the [Shell
Grammar](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_10)
section of the specification linked above.

The code is licensed under an MIT license.
npm package: @fig/sfdx
Description: Generate a Fig spec based on your SFDX setup
Author: The Fig Team
Latest version: 0.1.0

# fig_sfdx

Generate a Fig spec with your SFDX plugins.

## Install

Install the plugin, generate your completions, then restart Fig.

```bash
sfdx plugins:install @fig/sfdx
sfdx fig:generate --publish
fig restart
```

When you run `sfdx plugins:update` to update your plugins, you'll need to run
`sfdx fig:generate --publish` again.
npm package: @figassis/react-websocket
Description: ReactJS Websocket Listener Component
Latest version: 2.1.1

# react-websocket [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/mehmetkose/react-websocket/edit/master/README.md) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmehmetkose%2Freact-websocket.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmehmetkose%2Freact-websocket?ref=badge_shield)

`react-websocket` is a easy-to-use React component for websocket communications.

## Help Wanted

Things here are running very slowly as I have a lot of other stuff to take care at the moment so please don't be upset if I don't answer your question or if a PR sits unreviewed for a few days or weeks. Anyone interested in helping it move faster can help by submitting or reviewing PR's and answering each other's questions.


### Installing

```
npm install --save react-websocket
```

### Usage

```js
  import React from 'react';
  import Websocket from 'react-websocket';

  class ProductDetail extends React.Component {

    constructor(props) {
      super(props);
      this.state = {
        count: 90
      };
    }

    handleData(data) {
      let result = JSON.parse(data);
      this.setState({count: this.state.count + result.movement});
    }

    render() {
      return (
        <div>
          Count: <strong>{this.state.count}</strong>

          <Websocket url='ws://localhost:8888/live/product/12345/'
              onMessage={this.handleData.bind(this)}/>
        </div>
      );
    }
  }

  export default ProductDetail;
```

### Properties

#### url

**required**
The url the websocket connection is listening to.

#### onMessage

**required**
The callback called when data is received. Data is `JSON.parse`'d

#### onOpen

The callback called when the connection is successfully opened.

#### onClose

The callback called when the connection is closed either due to server disconnect or network error.

#### debug

default: **false**
Set to **true** to see console logging

#### reconnect

default: **true**

accelerated reconnection time


## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmehmetkose%2Freact-websocket.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmehmetkose%2Freact-websocket?ref=badge_large)
npm package: @figedi/cqrs
Description: Yet another cqrs implementation
Author: Felix Kaminski
Latest version: 1.9.0

## @figedi/cqrs

Yet another event-bus library facilitating CQ(R)S patterns. Description will follow.

### Idea pile
- Add transient queries as well, e.g. for user-sensitive data with persistence = "pg"

## TODO / BUGS
- when pool-size is too small (e.g. defaults), it just hangs (see the UOWDecorator test)
npm package: @figedi/sentry-fastify
Description: A request-/tracing-middleware for sentry in fastify
Author: Felix Kaminski
Latest version: 1.1.2

## @figedi/sentry-fastify

A fastify compatible request-/tracing-middleware. Mainly ported from the official @sentry/node package

## Usage 

To add tracing, first make sure you have initialized sentry correctly according to their docs, then
during fastify-server initialization, add the following snippets:

```
if (process.env.SENTRY_DSN) {
    server.register(require('@figedi/sentry-fastify').sentryTracingPlugin);
}
```

```
server.setErrorHandler(
    combineErrorHandlers(
        [
            process.env.SENTRY_DSN ? require('./lib/sentry').errorHandler({ shouldHandleError: () => true }) : undefined,
            // your other error handlers here
        ].filter(Boolean),
    ),
);
```
npm package: @fightant1w1ll/ccn
Description: create Chinese name using Node.js.
Author: fightant1w1ll
Latest version: 0.0.2

# create Chinese name

A cli tool to create Chinese name.

## Install

`npm i -g ccn`

## Example

The format of parameter is like:
ccn resultCount surnameLength(optional) fullNameLength(optional)

1. `ccn 2` (create 2 names, surname will be 1 word and the full name will be 2 words by default)

```
封珊
1. 金：秀气伶俐，多才巧智，中年成功隆昌，出国之字。
冷合
1. 水：环境良好，一生清雅温和，中年励业，晚年成功隆昌。
```

2. `ccn 3 1 3` (create 3 names, surname will be 1 word and the full name will be 3 words)

```
柯认籍
1. 金：忧心劳神，病弱短寿，一生多灾，有爱情厄，晚年吉祥。
2. 木：晚婚迟得子吉，白手成家，自力更生，中年勤俭，晚年隆昌。
蔡谕黯
1. 金：胆识丰富，精明公正，官运旺，中年成功隆昌，出国之字。
2. 水：不祥之字，暗淡无光，身弱短寿，中年多灾，晚年劳神。
袁作殊
1. 金：忧心劳神，刑偶欠子，中年隆昌，晚年劳神，一生劳苦。
2. 金：有爱情厄，忧心劳神，中年有灾，晚年吉祥，不幸之字。
```

## Notes

1. Full name length must be bigger than the surname length
2. The max surname length is 5
3. The max first name length is 3

## This repo is based on [chinese-random-name](https://github.com/XadillaX/chinese-random-name), thanks to [XadillaX](https://github.com/XadillaX)
npm package: @fighting-design/fighting-icon
Description: Special svg icon library for fighting-design.
Author: tyh2001
Latest version: 0.4.0

# @fighting-design/fighting-icon <a href="https://www.npmjs.com/package/@fighting-design/fighting-icon"><img src="https://badgen.net/npm/v/@fighting-design/fighting-icon" /></a>

中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/packages/fighting-icon/README.en-US.md)

## 🐳 介绍

`Fighting Design` 专用 `svg` 图标库。

## ⚒️ 安装

```shell
# pnpm
pnpm add --save-dev @fighting-design/fighting-icon

# npm
npm i --save-dev @fighting-design/fighting-icon

# yarn
yarn --save-dev add @fighting-design/fighting-icon
```

## 🔑 在线地址

[文档](https://fighting.tianyuhao.cn/components/svg-icon.html)

## 🔅 贡献

[CONTRIBUTING](https://github.com/FightingDesign/fighting-design/blob/master/packages/fighting-icon/CONTRIBUTING.md)

## ✨ 更新日志

[CHANGELOG](https://github.com/FightingDesign/fighting-design/blob/master/packages/fighting-icon/CHANGELOG.md)

## 💌 特别感谢

- [icones](https://github.com/antfu/icones)

## 💬 执照

[MIT](https://github.com/FightingDesign/fighting-design/blob/master/packages/fighting-icon/LICENSE)
npm package: @fighting-design/fighting-theme
Description: Fighting Design all style are settled here
Latest version: 1.1.0

# @fighting-design/fighting-theme <a href="https://www.npmjs.com/package/@fighting-design/fighting-theme"><img src="https://badgen.net/npm/v/@fighting-design/fighting-theme" /></a>

English | [Chinese](https://github.com/FightingDesign/fighting-design/blob/master/packages/fighting-theme/README.md)

## 🐳 Introduction

Theme style directory of `fighting-design`

## 🦩 Catalog Description

```
├── config                Some style definitions common to components, such as type, etc
├── src                   Main style sheet storage directory of each component
├── index.scss            The main style entry file is also a package entry file
├── package.json          package.json
├── README.en-US.md       README.en-US.md
└── README.md             README.md
```

## 🚧 Rule

- Create a new `*.scss` with the same component name in the `src` directory file to develop component style sheets
- At the main entrance `index.scss` You need to import your new `*.scss` files are provided for use
- Is not allowed in the style `!important`
- The file names are connected by a short horizontal bar, and no uppercase letters are allowed
- In the `src/*` directory, it is the `*.scss` file
- In the `config/*` directory, there are some configuration variable files of components. The configuration files of components are all named `var-component-name.scss`. The global configuration file uses `const-***.scss` Naming

## 🐿️ Unique Style

Each component will have a unique style, such as `f-button`,`f-icon`, etc. In order to avoid style conflicts, you need to strictly restrict the pollution of its internal style or peer style to other components.

For example, in the `FButton` component, the round corner attribute can be configured through the `round` attribute. The pseudo code is as follows:

```html
<button
  :class="[
  'f-button',
  { 'f-button-round': round }
  ]"
>
  按钮组件
</button>
```

Because there will be a unique `class` in a component, that is,`f-button`, then `f-button` should also be added in front of the `f-button__round` attribute to prevent style pollution.

Negative example:

```css
.f-button {
  /*  */
}
.f-button__round {
  border-radius: 4px;
}
```

Positive examples:

```css
.f-button {
  /*  */
}
.f-button.f-button__round {
  border-radius: 4px;
}
```

## 🦄 Import

The following methods can be used anywhere in the world

```ts
import '@fighting-design/fighting-theme'
```
npm package: @fighting-design/vite-plugin-vue-fighting-setup-name
Description: The vite plug-in used internally by fighting-design to set the component name.
Author: tyh2001
Latest version: 0.1.0

# @fighting-design/vite-plugin-vue-fighting-setup-name

中文 | [英文]()

## 📢 介绍

Fighting Design 内部使用的 vite 插件，用于设置组件名。

## ⚒️ 安装

```shell
# pnpm
pnpm add --save-dev @fighting-design/vite-plugin-vue-fighting-setup-name

# npm
npm i --save-dev @fighting-design/vite-plugin-vue-fighting-setup-name

# yarn
yarn --save-dev add @fighting-design/vite-plugin-vue-fighting-setup-name
```

## 💡 使用

在 `vite.config.ts` 中引入下面内容

```ts
import vue from '@vitejs/plugin-vue'
import FightingSetupNamePlugin from '@fighting-design/vite-plugin-vue-fighting-setup-name'
import type { UserConfigExport } from 'vite'

export default (): UserConfigExport => {
  return {
    base: './',
    plugins: [vue(), FightingSetupNamePlugin()]
  }
}
```
npm package: @fightingdreamer/iter-count
Description: Count number of items in iterator.
Author: Patryk Stępień
Latest version: 0.1.3

# iter-count

## Description

Count items in `Iterable`.

Second implementation will count unique items and group them (similar to `uniq -c`).

## Install

```bash
bun add @fightingdreamer/iter-count
```

## Usage

```js
import {count} from '@fightingdreamer/iter-count'

const value = ['a', 'a', 'b'][Symbol.iterator]()
const result = count(value)
const expect = 3
console.assert(result == expect)
```

```js
import {countUnique} from '@fightingdreamer/iter-count'

const value = ['a', 'a', 'b'][Symbol.iterator]()
const result = countUnique(value)
const expect = new Map([['a', 2], ['b', 1]])
for (const [key, value] of expect.entries()) {
  console.assert(result.get(key) == value)
}
```

## Usage (node / commonjs)

```js
const {count} = require('@fightingdreamer/iter-count')

const value = ['a', 'a', 'b'][Symbol.iterator]()
const result = count(value)
const expect = 3
assert(result == expect)
```

```js
const {countUnique} = require('@fightingdreamer/iter-count')

const value = ['a', 'a', 'b'][Symbol.iterator]()
const result = countUnique(value)
const expect = new Map([['a', 2], ['b', 1]])
for (const [key, value] of expect.entries()) {
  assert(result.get(key) == value)
}
```

## Functions

```js
function count<T>(iterator: Iterable<T>): number
```

Will count items in 'iterator'.

```js
function countUnique<T>(iterator: Iterable<T>): Map<T, number>
```

Will count items in 'iterator' and group them into Map.
npm package: @fightingdreamer/iter-filter
Description: Missing filter over iterator.
Author: Patryk Stępień
Latest version: 0.1.4

# iter-filter

## Description

Missing filter over `Iterable`, similar to Array.filter.

## Install

```bash
bun add @fightingdreamer/iter-filter
```

## Usage

```js
import {filter} from '@fightingdreamer/iter-filter'

const vector = [1,2,3,4,5,6,7,8][Symbol.iterator]()
const result = filter(vector, (v) => v == 6).next().value
const expect = 6
console.assert(result == expect)
```

## Usage (node / commonjs)

```js
const {filter} = require('@fightingdreamer/iter-filter')

const vector = [1,2,3,4,5,6,7,8][Symbol.iterator]()
const result = filter(vector, (v) => v == 6).next().value
const expect = 6
assert(result == expect)
```

## Functions
```js
function* filter<T>(
    iterator: Iterable<T>,
    callbackFn: (item: T, index: number) => boolean
): Generator<T>
```
Will yield matching items from `iterator` as output being consumed.
npm package: @fightingdreamer/iter-flatten
Description: Missing flatten over iterable.
Author: Patryk Stępień
Latest version: 0.1.3

# iter-flatten

## Description

Missing flatten over `Iterable`, similar to `Array.flat` but operates on fixed deepness of 1.

## Install

```bash
bun add @fightingdreamer/iter-flatten
```

## Usage

```js
import {flatten} from '@fightingdreamer/iter-flatten'

const vector = [
  ['a','b','c'][Symbol.iterator](),
  ['d','e','f'][Symbol.iterator](),
][Symbol.iterator]()
const result = Array.from(flatten(vector))
const expect = ['a','b','c','d','e','f']
for (const [index, value] of expect.entries()) {
  console.assert(result.at(index) == value)
}
```

## Usage (node / commonjs)

```js
const {flatten} = require('@fightingdreamer/iter-flatten')

const vector = [
  ['a','b','c'][Symbol.iterator](),
  ['d','e','f'][Symbol.iterator](),
][Symbol.iterator]()
const result = Array.from(flatten(vector))
const expect = ['a','b','c','d','e','f']
for (const [index, value] of expect.entries()) {
  assert(result.at(index) == value)
}
```

## Functions
```js
function* flatten<T>(iterator: Iterable<Iterable<T>>): Generator<T>
```

Will chain inner iterables into one long iterable.
npm package: @fightingdreamer/iter-map
Description: Missing map over iterable.
Author: Patryk Stępień
Latest version: 0.1.3

# iter-map

## Description

Missing map over `Iterable`, similar to Array.map.

## Install

```bash
bun add @fightingdreamer/iter-map
```

## Usage

```js
import {map} from '@fightingdreamer/iter-map'

const vector = [1,2,3][Symbol.iterator]()
const result = Array.from(map(vector, (v, i) => v * i)).at(-1)
const expect = 6
console.assert(result == expect)
```

## Usage (node / commonjs)

```js
const {map} = require('@fightingdreamer/iter-map')

const vector = [1,2,3][Symbol.iterator]()
const result = Array.from(map(vector, (v, i) => v * i)).at(-1)
const expect = 6
assert(result == expect)
```

## Functions
```js
function* map<T, R>(
  iterator: Iterable<T>,
  callbackFn: (item: T, index: number) => R,
): Generator<R>
```
Will yield converted items from `iterator` as output being consumed.
npm package: @fightingdreamer/iter-reduce
Description: Missing reduce over iterable.
Author: Patryk Stępień
Latest version: 0.1.5

# iter-reduce

## Description

Missing reduce function for iterator based input, similar to Array.reduce.

Second implementation can better handle cases of input with length 0 or 1.

## Install

```bash
bun add @fightingdreamer/iter-reduce
```

## Usage

```js
import {reduceWithInitial} from '@fightingdreamer/iter-reduce'

const vector = [1,2,3][Symbol.iterator]()
const result = reduceWithInitial(vector, (r, v) => r + v, 3)
const expect = 9
console.assert(result == expect)
```

```js
import {reduceWithDefault} from '@fightingdreamer/iter-reduce'

const vector = [1][Symbol.iterator]()
const result = reduceWithDefault(vector, (r, v) => Math.min(r, v), 0)
const expect = 1
console.assert(result == expect)
```

## Usage (node / commonjs)

```js
const {reduceWithInitial} = require('@fightingdreamer/iter-reduce')

const vector = [1,2,3][Symbol.iterator]()
const result = reduceWithInitial(vector, (r, v) => r + v, 3)
const expect = 9
assert(result == expect)
```

```js
const {reduceWithDefault} = require('@fightingdreamer/iter-reduce')

const vector = [1][Symbol.iterator]()
const result = reduceWithDefault(vector, (r, v) => Math.min(r, v), 0)
const expect = 1
assert(result == expect)
```

## Functions

```js
function reduceWithInitial<T, R>(
  iterable: Iterable<T>,
  callbackFn: (accumulator: R, currentValue: T, currentIndex: number) => R,
  initialValue: R,
): R
```

For inputs of any length will call callbackFn on every item,
using initialValue as accumulator on first call.

This function is best suited for merging input into one item, or
creating collection from input reusing already collected items.

```js
function reduceWithDefault<T, D, R>(
  iterable: Iterable<T>,
  callbackFn: (accumulator: T | R, currentValue: T, currentIndex: number) => R,
  defaultValue: D,
): T | D | R {
```

For inputs of length >= 2 will call callbackFn on every item except first one,
using first item as accumulator on first call.

For inputs of length == 1 will not call callbackFn and return first item.

For inputs of length == 0 will not call callbackFn and return defaultValue item.

This function is best suited for cases when initial value can easily distort result,
eg. finding `Math.min` from `Iterable<number>`.
npm package: @fightingdreamer/math-modulo
Description: Mathematically correct modulo
Author: Patryk Stępień
Latest version: 0.1.2

# math-modulo

## Description

Several variants of modulo operation.

## Install

```bash
bun add @fightingdreamer/math-modulo
```

## Usage

```js
import {flooredModulo} from '@fightingdreamer/math-modulo';

const result = flooredModulo(-1, 4)
const expect = 3
console.assert(result == expect)
```

## Usage (node / commonjs)

```js
const {flooredModulo} = require('@fightingdreamer/math-modulo');

const result = flooredModulo(-1, 4)
const expect = 3
assert(result == expect)
```


## Functions

```js
function truncatedModulo(value: number, divisor: number): number
```
Based on truncated division, result have the same sign as the value.

```js
function euclideanModulo(value: number, divisor: number): number
```
Based on euclidean division, result is always non negative.

```js
function flooredModulo(value: number, divisor: number): number
```
Based on floored division, result have the same sign as the divisor.

```js
function roundedModulo(value: number, divisor: number): number
```
Based on rounded division, result have sign and falls between divisor/-2 and divisor/+2.

```js
function ceiledModulo(value: number, divisor: number): number
```
Based on ceiled division, result have the opposite sign as the divisor.
npm package: @fightingdreamer/nes-react
Description: React component library for nes.css
Author: bschulte
Latest version: 1.0.2-1

# nes-react

> React component library for nes.css

[![NPM](https://img.shields.io/npm/v/nes-react.svg)](https://www.npmjs.com/package/nes-react) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save nes-react
```

## Demo

https://bschulte.github.io/nes-react/

## Usage

If you want to use the default font family for nes.css (Press Start 2P), make sure to include that in your app in whatever way you choose.
To use Google Font APIs, just stick a

```html
<link
  href="https://fonts.googleapis.com/css?family=Press+Start+2P"
  rel="stylesheet"
/>
```

in your app.

```tsx
import * as React from "react";

import { Container } from "nes-react";

class Example extends React.Component {
  render() {
    return <Container>We're using containers from nes.css!</Container>;
  }
}
```

## Development

`git clone --recursive git@github.com:bschulte/nes-react.git`

`npm install` in both the root folder and in /example.

`npm run dev` then also in both the root folder and in /example.

## See Also
Check out https://github.com/Divoolej/react-select-nes-css-theme for making the popular [react-select](https://github.com/JedWatson/react-select) fit in with nes.css!

## License

MIT © [bschulte](https://github.com/bschulte)
npm package: @fightingdreamer/set-difference
Description: Missing difference operation over Set.
Author: Patryk Stępień
Latest version: 0.1.0

# set-difference

## Description

Missing difference operation for Set or any Iterable.

Second implementation can do difference operation between any number of iterables.

## Install

```bash
bun add @fightingdreamer/set-difference
```

## Usage

```js
import {difference} from '@fightingdreamer/set-difference'

const a = new Set([1,2,3])
const b = [3,4,5][Symbol.iterator]()
const result = difference(a, b)
const expect = [1,2]
for (const value of expect) {
  console.assert(result.has(value))
}
```

```js
import {differenceMany} from '@fightingdreamer/set-difference'

const main = [1,2,3,4,5,6,7,8,9][Symbol.iterator]()
const sets = [
  [2,3][Symbol.iterator](),
  [5,6][Symbol.iterator](),
  [8,9][Symbol.iterator]()
][Symbol.iterator]()
const result = differenceMany(main, sets)
const expect = [1,4,7]
for (const value of expect) {
  console.assert(result.has(value))
}
```

## Usage (node / commonjs)

```js
const {difference} = require('@fightingdreamer/set-difference')

const a = new Set([1,2,3])
const b = [3,4,5][Symbol.iterator]()
const result = difference(a, b)
const expect = [1,2]
for (const value of expect) {
  assert(result.has(value))
}
```

```js
const {differenceMany} = require('@fightingdreamer/set-difference')

const main = [1,2,3,4,5,6,7,8,9][Symbol.iterator]()
const sets = [
  [2,3][Symbol.iterator](),
  [5,6][Symbol.iterator](),
  [8,9][Symbol.iterator]()
][Symbol.iterator]()
const result = differenceMany(main, sets)
const expect = [1,4,7]
for (const value of expect) {
  assert(result.has(value))
}
```

## Functions

```js
function difference<T>(a: Iterable<T>, b: Iterable<T>): Set<T>
```

Will apply difference operation between Iterable and Iterable.

```js
function differenceMany<T>(main: Iterable<T>, sets: Iterable<Iterable<T>>): Set<T>
```

Will apply difference operation between main Iterable and any number of Iterables.
npm package: @fightingdreamer/set-intersection
Description: Missing intersection operation over Set.
Author: Patryk Stępień
Latest version: 0.1.1

# set-intersection

## Description

Missing itersection operation for Set.

Second implementation can do intersection operation between any number of sets.

Third implementation can do intersection operation between any combination of sets.

## Install

```bash
bun add @fightingdreamer/set-intersection
```

## Usage

```js
import {intersection} from '@fightingdreamer/set-intersection'

const a = new Set([1,2,3])
const b = new Set([3,4,5])
const result = intersection(a, b)
const expect = [3]
for (const value of expect) {
  console.assert(result.has(value))
}
```

```js
import {intersectionMany} from '@fightingdreamer/set-intersection'

const sets = [
  new Set([1,2,3]),
  new Set([2,3,4]),
  new Set([3,4,5])
][Symbol.iterator]()
const result = intersectionMany(sets)
const expect = [3]
for (const value of expect) {
  console.assert(result.has(value))
}
```

```js
import {intersectionPartial} from '@fightingdreamer/set-intersection'

const sets = [
  new Set([1,2,3]),
  new Set([2,3,4]),
  new Set([3,4,5])
][Symbol.iterator]()
const result = intersectionPartial(sets, 2)
const expect = [2,3,4]
for (const value of expect) {
  console.assert(result.has(value))
}
```

## Usage (node / commonjs)

```js
const {intersection} = require('@fightingdreamer/set-intersection')

const a = new Set([1,2,3])
const b = new Set([3,4,5])
const result = intersection(a, b)
const expect = [3]
for (const value of expect) {
  assert(result.has(value))
}
```

```js
const {intersectionMany} = require('@fightingdreamer/set-intersection')

const sets = [
  new Set([1,2,3]),
  new Set([2,3,4]),
  new Set([3,4,5])
][Symbol.iterator]()
const result = intersectionMany(sets)
const expect = [3]
for (const value of expect) {
  assert(result.has(value))
}
```


```js
const {intersectionPartial} = require('@fightingdreamer/set-intersection')

const sets = [
  new Set([1,2,3]),
  new Set([2,3,4]),
  new Set([3,4,5])
][Symbol.iterator]()
const result = intersectionPartial(sets, 2)
const expect = [2,3,4]
for (const value of expect) {
  assert(result.has(value))
}
```

## Functions

```js
function intersection<T>(a: Set<T>, b: Set<T>): Set<T>
```

Will return overlapping items from `a` and `b`.

```js
function intersectionMany<T>(sets: Iterable<Set<T>>): Set<T>
```

Will return overlapping items when item exist in every Set.

```js
function intersectionPartial<T>(
  sets: Iterable<Set<T>>,
  minCount: number,
): Set<T>
```

Will return overlapping items when item exist in at least `minCount` number of `sets`.
npm package: @fightingdreamer/set-union
Description: Missing union operation over Set.
Author: Patryk Stępień
Latest version: 0.1.4

# set-union

## Description

Missing union operation for Set or any Iterable.

Second implementation can do union operation between any number of iterables.

## Install

```bash
bun add @fightingdreamer/set-union
```

## Usage

```js
import {union} from '@fightingdreamer/set-union'

const a = new Set([1,2,3])
const b = [3,4,5][Symbol.iterator]()
const result = union(a, b)
const expect = [1,2,3,4,5]
for (const value of expect) {
  console.assert(result.has(value))
}
```

```js
import {unionMany} from '@fightingdreamer/set-union'

const sets = [
  [1,2,3][Symbol.iterator](),
  [3,4,5][Symbol.iterator](),
  [5,6,7][Symbol.iterator]()
][Symbol.iterator]()
const result = unionMany(sets)
const expect = [1,2,3,4,5,6,7]
for (const value of expect) {
  console.assert(result.has(value))
}
```

## Usage (node / commonjs)

```js
const {union} = require('@fightingdreamer/set-union')

const a = new Set([1,2,3])
const b = [3,4,5][Symbol.iterator]()
const result = union(a, b)
const expect = [1,2,3,4,5]
for (const value of expect) {
  assert(result.has(value))
}
```

```js
const {unionMany} = require('@fightingdreamer/set-union')

const sets = [
  [1,2,3][Symbol.iterator](),
  [3,4,5][Symbol.iterator](),
  [5,6,7][Symbol.iterator]()
][Symbol.iterator]()
const result = unionMany(sets)
const expect = [1,2,3,4,5,6,7]
for (const value of expect) {
  assert(result.has(value))
}
```

## Functions

```js
function union<T>(a: Iterable<T>, b: Iterable<T>): Set<T>
```

Will apply union operation between Set and Iterable.

```js
function unionMany<T>(sets: Iterable<Iterable<T>>): Set<T>
```

Will apply union operation between any number of Iterables.
npm package: @fightingdreamer/ui-slider
Description: Simple slider for ui applications.
Author: Patryk Stępień
Latest version: 0.0.1

# ui-Slider

Simple slider for ui applications. 

Demo:
* https://fightingdreamer.github.io/ui-slider

Features:
* Switchable orientation at runtime.
* Included steps functionality.
* Possibility for disable controls.
* Animations, well... safe animations (are suspended during user interactions).
* Multiple callbacks support (that can be silenced when setting value).
* Full CSS encapsulation (also for themes).
* SCSS styling without JavaScript help.
* Bootstrapable from single DOM element.
* Optional Browserify support.

Dependencies:
* jquery
* lodash: _.default, _.clamp

Licence:
* MIT