open-index/open-npm huggingface dataset:
npm package: @robotmafia-inc/prettier-config
Description: Prettier configuration
Author: robotmafia Inc.
Latest version: 1.0.0

# Prettier configuration by robotmafia team

## How to use
**Define this package as Prettier config in your `package.json`**:
```jsonc
{
  // ...
  "prettier": "@robotmafia-inc/prettier-config"
}
```

**Or require this package in your `.prettierrc.js`, if you want to overwrite some properties of this configuration**:
```js
module.exports = {
  ...require("@robotmafia-inc/prettier-config"),
  semi: false
};
```
npm package: @robotmayo/coderr
Description: Produce errors with a code property.
Author: robotmayo
Latest version: 1.2.0

# Coderr

A small extension on errors that adds a code property

`npm i @robotmayo/coderr`

# Usage

```javascript
import Coderr from "@robotmayo/coderr";

function throwable() {
  throw new Coderr("Hi I have a code", "ERR_EXAMPLE");
}

try {
  throwable();
} catch (err) {
  console.log(err.code);
}
```

You can also wrap existing errors

```javascript
import { wrap } from "@robotmayo/coderr";

function throwable() {
  throw wrap(new Error("My Error"), "ERR_EXAMPLE");
}

try {
  throwable();
} catch (err) {
  console.log(err.code);
}
```

# API

```typescript
export default class Coderr extends Error {
  code: string;
  constructor(message?: string, code?: string);
}
export declare function wrap(e: Error, code?: string): Coderr;
```
npm package: @robotmayo/kmultipart
Description: A multipart parser for koa.
Author: robotmayo
Latest version: 0.4.4

# kmultipart

A multipart body parser for koa. Definitely needs more eyes and testing before use in production.

## Install

`npm i @robotmayo/kmultipart`

## Features

- Custom storage engine

## Quick Start

```javascript
import KRouter from "@robotmayo/krouter";
import multipart, { Diskstorage } from "@robotmayo/kmultipart";
import * as Koa from "koa";
const app = new Koa();
const router = new KRouter();

router.post(
  "/upload",
  multipart({ storage: new DiskStorage({ destination: "/files" }) }),
  (ctx, next) => {
    ctx.body = "Uploaded ${ctx.request.files.length} file(s) succesfully";
  }
);

app.use(router.middleware());
app.listen();
```

## Api

`multipart(opts)`
Returns middleware that parses multipart forms using busboy

| Parameter     | Required | Type          | Description                               |
| ------------- | -------- | ------------- | ----------------------------------------- |
| opts          | True     | object        |                                           |
| storageEngine | True     | StorageEngine | A storage engine object or class instance |

Kmultipart requires a storage engine to function. It comes with two built in ones but its very simple to create your own.
A custom storage engine is simple an object or class instance with the function `handleFile`. It takes a single object containing the file stream and other information.

`{handleFile(handleFilePart)}`

`handleFilePart`

| Parameter | Type                  | Description                                            |
| --------- | --------------------- | ------------------------------------------------------ |
| file      | NodeJS.ReadableStream | The file stream                                        |
| filename  | string                | the original filename as it appeared on their computer |
| fieldname | string                | the fieldname of the object                            |
| ctx       | Koa.Context           | the koa context                                        |
| encoding  | string                | file encoding                                          |
| mimetype  | string                | file mimetype                                          |

## Why?

The major existing solutions dont support custom storage engines. Also writing my own sounded fun.
npm package: @robotmayo/stderror
Description: Small extension to the default error class, adding a code and context property
Author: robotmayo
Latest version: 1.0.0

# StdError

A small extension of the error adding code and context.

`npm i @robotmayo/stderror`

## Usage

Use it similar to how you would use a normal error.

```javascript
import StdError from "@robotmayo/stderror";
// Or with commonjs
const StdError = require("@robotmayo/stderror").default;
function thisWillThrow() {
  throw new StdError("Something went wrong.", "AUTH_ERROR");
}
```

## Api

`new StdError(message, code, [context])`

| Parameter | Required | Type   | Description                                                               |
| --------- | -------- | ------ | ------------------------------------------------------------------------- |
| message   | True     | string | The error message                                                         |
| code      | True     | string | The error code. Recommended to be all caps, underscores instead of spaces |
| context   | False    | Object | Object containing potentially useful meta information with the error      |
npm package: @roboto.js/robotojs
Description: Showcasing a lightweight and high-performance frontend framework built entirely with pure TypeScript! Featuring a custom Virtual DOM implementation and a set of reactive hooks, it delivers a React-like development experience—without any external framework
Author: Ayoub Es sarghini
Latest version: 1.0.2

# RobotoJs
Showcasing a lightweight and high-performance frontend framework built entirely with pure TypeScript! Featuring a custom Virtual DOM implementation and a set of reactive hooks, it delivers a React-like development experience—without any external frameworks or libraries, just clean and modular TypeScript code!

## Installation

```sh
npm install roboto-js
npm package: @robotomize/rater.js
Description: Calculate rating. Get rating based on binary classification.
Author: Ivanov Nikita
Latest version: 0.2.2

# rater.js

### A feature that can build you a rating based on a binary classification. You can build a rating of something, knowing the number of likes and dislikes for example.

### Install
```js
npm i @robotomize/rater.js
```
### Usage

```js
const positive = 600,
    total = 1486;
/**
 * Wilson interval
 */
console.log(wilson.calc(positive, total));
0.37561016479808434

/**
 * rate function
 */
console.log(wilson.rate(positive, total));
38
```
npm package: @robotopia/assets-loader
Description: simple asset loader for images
Author: Paul Sonnentag
Latest version: 1.0.1

# assets-loader

simple assets loader for images

```bash
npm install @robotopia/assets-loader
```

## Usage

Initially load all your images

```Javascript
const assets = require('@robotopia/assets-loader')

assets.load({
  HERO: 'path/to/hero.png',
  WATER_TILE: 'path/to/water-tile.png',
})
.then(() => { 
  // start application 
})
.catch(() => console.log('error loading assets'))
```

After all images have been loaded they can be accessed by their name 

```Javascript
assets.store.HERO // reference to hero.png
```
npm package: @robotopia/clock
Description: util to handle dynamic time intervals
Author: Paul Sonnentag
Latest version: 1.0.2

# clock

util to handle dynamic time intervals

```
npm install @robotopia/clock
```

## Usage

### Clock

Clock can be used as a replacement for setInterval. It repeatedly calls a function or executes a code snippet, with a specified time delay between each call. Unlike setInterval the interval can be dynamically changed or paused

```JavaScript
const Clock = require('@robotopia/clock')

const clock = new Clock(300)

// starts clock, will trigger on progress immediately
clock.start()

// tick, called every 300 ms
clock.onTick(() => console.log('tick')) 

// called on requestAnimationFrame in between ticks, progress represents percentage of time passed until next frame
clock.onProgress((progress) => console.log(progress))
 
// stop clock interval 
clock.stop()

```

### Timer

Timer is a replacement for Date.now() with the added ability to pause time

```JavaScript
const Timer = require('@robotopia/clock/timer')

const timer = new Timer()

// starts timer
timer.start()

// returns timestamp relative to when start was called
timer.now()

// pauses clock 
clock.pause()

```

## License

MIT
npm package: @robotpajamas/headlessui-svelte
Description: An unofficial port of the HeadlessUI component library to Svelte 5+.
Author: SJ
Latest version: 2.2.0-beta.3

# headlessui-svelte

This is an alpha port of [HeadlessUI](https://headlessui.com/) targeting Svelte 5 (or later).

A primary design goal is to stay as reasonably faithful to the HeadlessUI-React API as possible, in order to integrate better with [TailwindUI](https://tailwindui.com/). A secondary design goal is to align folder naming and tests, in order to reduce cognitive burden when porting and making updates.

This can manifest in strange, but intentional, ways:
- the existence of a `hooks` folder (not [SvelteKit hooks](https://svelte.dev/docs/kit/hooks))
- using test functions from the main headlessui repo, instead of the equivalent `testing-library` functionality
- the existence of a `Fragment` component
- ...

## Installation

```bash
npm install @robotpajamas/headlessui-svelte
```

## Documentation

Full documenation and examples will eventually live at [headlessui-svelte.com](https://headlessui-svelte.com)

## Progress

The target compatibility for the components below is based on [HeadlessUI React 2.2.0 (d71fb9c)](https://github.com/tailwindlabs/headlessui/tree/d71fb9cd2e12f5a48617b26e6bb3db90b3e07965). A component is considered completed when most of the mapped-over tests pass, and the component functions similarly to [headlessui.com](headlessui.com).

### Forms

- [ ] Button
- [ ] Checkbox
- [ ] Combobox
- [ ] Description
- [ ] Field
- [ ] Fieldset
- [ ] Input
- [ ] Label
- [ ] Listbox
- [ ] Radio Group
- [ ] Select
- [ ] Switch
- [ ] Textarea

### Components

- [ ] Dropdown Menu
- [ ] Disclosure
- [ ] Dialog
- [ ] Popover
- [ ] Portal
- [ ] Tabs
- [ ] Transition

## Community

Other Svelte-based HeadlessUI implementations:

- CaptainCodeman: https://github.com/CaptainCodeman/svelte-headlessui
- rgossiaux: https://github.com/rgossiaux/svelte-headlessui

## License

This library is licensed under the MIT license; see the LICENSE file for more.
npm package: @robotpajamas/svelte-hammertime
Description: A Svelte-centric HammerJS .
Author: SJ
Latest version: 0.0.3

# svelte-hammertime

svelte-hammertime is a library that wraps HammerJS gesture handlers in Svelte use directives. It allows you to easily add touch and gesture support to your Svelte applications.

The library also exposes Typescript types for Svelte, which can be useful if you are using Typescript in your Svelte project.

## Installation

You can install svelte-hammertime using npm:

```bash
npm install --save svelte-hammertime
```

## Usage

To use svelte-hammertime, you first need to import the desired gesture handlers from the library:

```js
import { pan, swipe } from "svelte-hammertime";
```

Next, you can use the use directive to attach the gesture handlers to an element:

```svelte
<script>
  import { pan, swipe } from "svelte-hammertime";

  let x = 0;
  let y = 0;

  function handlePan(event) {
    x += event.deltaX;
    y += event.deltaY;
  }

  function handleSwipe(event) {
    console.log("Swiped!", event.direction);
  }
</script>

<div use:pan={handlePan} use:swipe={handleSwipe}>...</div>
```

In this example, the pan and swipe gesture handlers are attached to a div element using the use directive. When the user pans on the element, the handlePan function is called with the pan event, and the x and y variables are updated accordingly. When the user swipes on the element, the handleSwipe function is called with the swipe event, and a message is logged to the console.

Note that you can attach multiple gesture handlers to the same element by using multiple use directives:

```html
<div use:pan="{handlePan}" use:swipe="{handleSwipe}">...</div>
```

## Available Gesture Handlers

The following gesture handlers are available in svelte-hammertime:

- pan
- pinch
- press
- rotate
- swipe
- tap

You can import them individually or all together using the wildcard:

```js
import { pan, swipe } from "svelte-hammertime";
import * as hammertime from "svelte-hammertime";
```

## Typescript Support

svelte-hammertime also provides Typescript types for the gesture handlers. If you are using Typescript in your Svelte project, you can import the types from the library:

```ts
import type { PanEvent } from "svelte-hammertime";
```

## License

svelte-hammertime is released under the MIT License.
npm package: @robotpajamas/svelte-headlessui
Description: A somewhat complete, mostly full-featured, unofficial Svelte port of Headless UI, an unstyled, fully accessible UI component library.
Author: SJ
Latest version: 1.0.3-rc0

# svelte-headlessui

This is an unofficial, complete Svelte port of the Headless UI component library (https://headlessui.dev/). It contains **fully accessible, feature-rich, unstyled** UI components.

Documentation for this library is available at https://svelte-headlessui.goss.io

## Who is this for?

This library is for you if you fall into one of two categories:

- You want unstyled yet sophisticated customizable UI components that fully follow the WAI-ARIA specs. You want a component library to handle all the messy details (keyboard navigation, focus management, aria-\* attributes, and many many more), but you want to style your components yourself and not be constrained by existing design systems like Material UI.
  - Alternatively, you want to implement an existing design system in Svelte, and want a powerful set of primitives to build your components on, letting you focus on styling.
- You want to use the commercial Tailwind UI component library (https://tailwindui.com/) in your Svelte project, and want a drop-in replacement for the React/Vue components which power Tailwind UI.

This project is intended to keep an API as close as possible to the React API for the base Headless UI project, with only a few small differences. While one of the primary goals is to enable using Tailwind UI in a Svelte project with as little effort as possible, **neither Tailwind UI nor Tailwind CSS is required** to use these components.

This project is an **unofficial** port. I have no affiliation with Tailwind Labs and cannot offer commercial support for this project. With that said, I intend to keep it as up to date as possible with the upstream Headless UI project, including porting new components when they are released.

## Installation

```
npm install -D @rgossiaux/svelte-headlessui
```

## Usage

See https://svelte-headlessui.goss.io for full documentation.

## Credits

Credit for everything good about this library goes to Tailwind Labs for writing the original React/Vue versions. All bugs should be assumed to be my fault in the port (though as the codebases are so similar, bugs in upstream will likely affect this library too).

Additional thanks to https://github.com/hperrin/svelte-material-ui; this well-engineered Svelte library was the source of the action and event forwarding code, with minor modifications.

## License

This library is licensed under the MIT license; see the LICENSE file for more.
npm package: @robotpajamas/svelte-heroicons
Description: Svelte wrappers for the Heroicons library.
Author: SJ
Latest version: 2.0.15-rc.3

# svelte-heroicons

Yet another Svelte wrapper for [Heroicons](https://heroicons.com).

This library differs from others in a couple main ways:

- The icon components forward common event listeners to the underlying SVG, so you may use `on:click` and so on;
- The API is closer to the official React wrappers, making it easier to use when converting [Tailwind UI](https://tailwindui.com/) components to Svelte in conjunction with [svelte-headlessui](https://github.com/rgossiaux/svelte-headlessui);
- It's based on the latest version of Heroicons (at time of writing), **1.0.5**

# Installation

```
npm install -D @rgossiaux/svelte-heroicons
```

# Usage

Heroicons contains two types of icons: outline and solid. They can be imported from `@rgossiaux/svelte-heroicons/outline` and `@rgossiaux/svelte-heroicons/solid` respectively.

All icon names are CamelCased and end with the word `Icon`; for example, the `academic-cap` icon on heroicons.com is imported as `AcademicCapIcon`.

```svelte
<script>
  import { SelectorIcon } from "@rgossiaux/svelte-heroicons/solid";
  import { CheckIcon } from "@rgossiaux/svelte-heroicons/outline";
</script>

<CheckIcon />
<SelectorIcon class="my-class" aria-hidden="true" />
```

# Documentation

See [heroicons.com](https://heroicons.com) for the full list of icons.

# License

As with the main Heroicons library, this library is MIT licensed.

# Credit

All credit goes to Tailwind Labs for designing the icons and to the [svg-to-svelte](https://github.com/metonym/svg-to-svelte) library for the tooling to wrap them as Svelte components.