open-index/open-npm huggingface dataset:
npm package: @futil/core
Description: Contains all the utilities
Author: Michael Wolf
Latest version: 0.0.5

<h1 align="center">@futil/core</h1>
<p align="center">All the frontend utilities you can dream of.</p>
<p align="center">
<a href="https://www.npmjs.com/package/@futil/core"><img src="https://badgen.net/npm/v/@futil/core?label=&icon=npm&color=blue" alt="npm version" height="18"/></a>
</p>

## Installation

```bash
# npm
$ npm i --save @futil/core

# yarn
$ yarn add @futil/core

# pnpm
$ pnpm add @futil/core
```

## Usage

```tsx
import { spread } from '@futil/core/v1/spread';
// or
// import { spread } from '@futil/core/v1';
import {
  SomeOtherComponent,
  type SomeOtherComponentProps,
} from 'some-other-component';

type MyReactComponentProps = {
  someOtherComponentProps?: SomeOtherComponentProps;
};

const MyReactComponent = ({
  someOtherComponentProps,
}: MyReactComponentProps) => {
  return <SomeOtherComponent {...spread(someOtherComponentProps)} />;
};
```
npm package: @futil/internal
Description: Internal utilities for futil.
Author: Michael Wolf
Latest version: 0.0.0

<h1 align="center">@futil/internal</h1>
<p align="center">Internal utilities for futil</p>
<p align="center">
<a href="https://www.npmjs.com/package/@futil/core"><img src="https://badgen.net/npm/v/@futil/core?label=&icon=npm&color=blue" alt="npm version" height="18"/></a>
</p>

Although these are internal utilities, you can surely install the public package
and use its tools.

## Installation

```bash
# npm
$ npm i --save @futil/internal

# yarn
$ yarn add @futil/internal

# pnpm
$ pnpm add @futil/internal
```
npm package: @futil/v1
Description: The initial package full of futils.
Author: Michael Wolf
Latest version: 0.0.3

<h1 align="center">@futil/v1</h1>
<p align="center">The v1 package for futils which contains all helper functions that are planned to be available in the eventual major release.</p>
<p align="center">
<a href="https://www.npmjs.com/package/@futil/core"><img src="https://badgen.net/npm/v/@futil/core?label=&icon=npm&color=blue" alt="npm version" height="18"/></a>
</p>

## Installation

```bash
# npm
$ npm i --save @futil/v1

# yarn
$ yarn add @futil/v1

# pnpm
$ pnpm add @futil/v1
```
npm package: @futils/multi-threading
Description: A simple multithreading library
Author: FishingHacks
Latest version: 1.0.0

# multi-threading

**[Issues and Pull Requests](https://github.com/FishingHacks/futils/labels/multi-threading)**

## Usage

where you want to use the thread:

```typescript
import { startThread } from '@futils/multi-threading';

const thread = startThread<
    'log' | 'eval',
    { log: string; eval: string },
    { log: void; eval: any }
>('./<filename>.js');

export type standardThread = typeof thread;
```

the thread script:

```typescript
import { standardThread } from './<thread-launch-scriptname>';
import { getThreadProcess } from '@fuilts/multi-threading';

const thread = getThreadProcess<standardThread>();
```

## Interface for the thread launcher

- `send(channel, data): Promise<returnedData>`: This will send a message to the thread. The channel is the first type provided to startThread, the data the second and the returnedData the 3rd
- `kill()`: This will kill the thread
- `onMessage(message, (data: returnedData)): () => {}`: This will register a messagelistener for a particular message. message is the first type provided to startThread, returnedData the 3rd. It returns a function, that when called, unregisters the listener
- `onMessageOnce(message, (data: returnedData)): () => {}`: This will register a messagelistener for a particular message. message is the first type provided to startThread, returnedData the 3rd. It returns a function, that when called, unregisters the listener. The listener gets automatically removed after it got triggered once.
- `removeListener(message, cb)`: This will remove a `onMessage` and `onMessageOnce` listener. The cb has to be the same function, not just one that has the same behavior and contents
- `isRunning(): boolean`: Tells you if the thread is still running
- `stop()`: Stops the thread
- `whenExit()`: This will resolve when the thread exits, or immediately if its not running
- `whenReady()`: This will resolve when the thread is ready, or immediately if its running and already ready.


## Interface for the thread client (script)

- `send(message, data)`: This will send a message to the thread launcher. message is the first type provided to startThread, and data the 3rd
- `onMessage(message, (data) => returnedData|Promise<returnedData>)`: This will listen for a message. message is the first type provided to startThread, data the 2nd and returnedData the 3rd. It returns a funtion, that when called, unregisters the listener.
- `onMessageOnce(message, (data) => returnedData|Promise<returnedData>)`: This will listen for a message. message is the first type provided to startThread, data the 2nd and returnedData the 3rd. It returns a funtion, that when called, unregisters the listener. The listener gets automatically removed after it got triggered once.
- `removeListener(message, cb)`: This will remove a `onMessage` and `onMessageOnce` listener. The cb has to be the same function, not just one that has the same behavior and contents
npm package: @futils/toml-writer
Description: A simple toml writer
Author: FishingHacks
Latest version: 1.0.2

# Toml Writer

A simple toml writer, compliant with the v1.0.0 specifications

**[Issues and Pull Requests](https://github.com/FishingHacks/futils/labels/toml-writer)**

## How to use

1. Import write from `@futils/toml-writer`
2. Supply your object to the write function
3. Do whatever you want with the returned string containing valid TOML.