open-index/open-npm huggingface dataset:
npm package: @samlam140330/bulma-switch
Description: Display classic checkbox as a switch button, in different colors, sizes, and states using Bulma framework. This is a fork version with some additional features and bug fixes of the original repository since it has been marked as an archive.
Author: SamLam140330
Latest version: 1.0.2

# Bulma Switch

[![NPM Version](https://img.shields.io/npm/v/%40samlam140330%2Fbulma-switch)](https://www.npmjs.com/package/@samlam140330/bulma-switch)
[![NPM Downloads](https://img.shields.io/npm/dy/%40samlam140330%2Fbulma-switch)](https://www.npmjs.com/package/@samlam140330/bulma-switch)

Bulma's extension to display checkbox as a toggle button.  
This is a fork version of the original repository [Bulma-switch](https://github.com/Wikiki/bulma-switch) with some additional features and bug fixes.  
Since the original repository is not maintained anymore and marked as achived, I decided to fork it and maintain it myself.

## Installation

```sh
npm install @samlam140330/bulma-switch
```

## Usage

```scss
@use "/node_modules/@samlam140330/bulma-switch/bulma-switch.scss";
```

## License

[![NPM License](https://img.shields.io/npm/l/%40samlam140330%2Fbulma-switch)](https://www.npmjs.com/package/@samlam140330/bulma-switch)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.

## Acknowledgments

- [Bulma](https://github.com/jgthms/bulma)
- [Wikiki](https://github.com/Wikiki/bulma-switch)

## Documentation & Demo

You can find the Documentation and a demo [here](https://wikiki.github.io/form/switch/)

![Screenshot of the Bulma Switch component](./switch-example.png)
npm package: @samlam140330/bulma-timeline
Description: Display a vertical timeline, in different colors, sizes, and states using Bulma framework. This is a fork version with some additional features and bug fixes of the original repository since it has been marked as an archive.
Author: SamLam140330
Latest version: 1.0.3

# Bulma Timeline

[![NPM Version](https://img.shields.io/npm/v/%40samlam140330%2Fbulma-timeline)](https://www.npmjs.com/package/@samlam140330/bulma-timeline)
[![NPM Downloads](https://img.shields.io/npm/dy/%40samlam140330%2Fbulma-timeline)](https://www.npmjs.com/package/@samlam140330/bulma-timeline)

Bulma's extension to display a timeline.  
This is a fork version of the original repository [Bulma-timeline](https://github.com/Wikiki/bulma-timeline) with some additional features and bug fixes.  
Since the original repository is not maintained anymore and marked as achived, I decided to fork it and maintain it myself.

## Installation

```sh
npm install @samlam140330/bulma-timeline
```

## Usage

```scss
@use "/node_modules/@samlam140330/bulma-timeline/bulma-timeline.scss";
```

## License

[![NPM License](https://img.shields.io/npm/l/%40samlam140330%2Fbulma-timeline)](https://www.npmjs.com/package/@samlam140330/bulma-timeline)

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details.

## Acknowledgments

- [Bulma](https://github.com/jgthms/bulma)
- [Wikiki](https://github.com/Wikiki/bulma-timeline)

## Documentation & Demo

You can find the Documentation and a demo [here](https://wikiki.github.io/components/timeline/)

![Screenshot of the Bulma Timeline component](./timeline-example.png)
npm package: @samlevy/string-helpers
Description: Basic string helper functions
Author: Samuel Levy
Latest version: 1.2.0

# String Helpers

[![Checks](https://github.com/samlev/string-helpers/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/samlev/string-helpers/actions/workflows/checks.yml)
![NPM Version](https://img.shields.io/npm/v/%40samlevy%2Fstring-helpers)
![NPM Last Update](https://img.shields.io/npm/last-update/%40samlevy%2Fstring-helpers)
![NPM License](https://img.shields.io/npm/l/%40samlevy%2Fstring-helpers)

Some basic JavaScript string helpers, loosely based on some of Laravel's string helpers.

## Installation

Install from NPM:
```bash
npm install @samlevy/string-helpers
```

## Usage

You can import the entire module to access the helpers:

```js
import Str from "@samlevy/string-helpers";

Str.camel('Foo Bar'); // 'fooBar'
Str.camel('foo/bar.baz'); // 'fooBarBaz'
Str.camel('foo bar'); // 'fooBar'

Str.headline('foo bar'); // 'Foo Bar'
Str.headline('foo/bar.baz'); // 'Foo Bar Baz'
Str.headline('fooBarBaz'); // 'Foo Bar Baz'

Str.snake('Foo Bar'); // 'foo_bar'
Str.snake('fooBarBaz'); // 'foo_bar_baz'
Str.snake('foo/bar.baz'); // 'foo_bar_baz'

Str.studly('Foo Bar'); // 'FooBar'
Str.studly('foo/bar.baz'); // 'FooBarBaz'
Str.studly('foo bar'); // 'FooBar'
```

Or you can import individual helpers:

```js
import { camel, random, squish } from "@samlevy/string-helpers";

camel('Foo Bar'); // 'fooBar'
camel('foo/bar.baz'); // 'fooBarBaz'
camel('foo bar'); // 'fooBar'

random(); // 'a1b2C3D4e5F6g7H8'
random(10); // 'a1b2C3D4e5'

squish('foo    bar'); // 'foo bar'
squish('    foo    bar    '); // 'foo bar'
squish("  \n\n  foo\nbar  \n\n\n  "); // 'foo bar'
```

## Testing

You can run the tests and linters through `npm run` or through `npx`:

```bash
# Tests
npm run test
npx jest

# Biome linting
npm run biome
npx biome check

# ESLint linting
npm run eslint
npx eslint

# OXLint linting
npm run oxlint
npx oxlint
```

## Contributing
Contributions via PR are welcome, either as complete changes (including tests), or as
failing test cases.
npm package: @samlfair/sveltekit
Description: The fastest way to build Svelte apps
Latest version: 2.5.0-fork-01

# The fastest way to build Svelte apps

This is the [SvelteKit](https://kit.svelte.dev) framework and CLI.

The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/main/packages/create-svelte) package:

```bash
npm create svelte@latest my-app
cd my-app
npm install
npm run dev
```

See the [documentation](https://kit.svelte.dev/docs) to learn more.

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md).
npm package: @samliebl/get-dirtree
Description: Programmatically print a simple directory tree in plain text. It's just an easy way for me to get the format I like.
Author: Sam Liebl
Latest version: 1.2.0

# Directory Tree

Programmatically print a simple directory tree in plain text. It's just an easy way for me to get the format I like.

## Usage

Module exports a function `printDirectoryTree(dir, output)` where parameter `dir` is the directory for which you want the tree and `output` is the file output path.

For example&hellip;

```js
import { printDirectoryTree } from "./index.js";

printDirectoryTree('test', 'dist/directory_tree.txt');
```

&hellip;will give you a file `./dist/directory_tree.txt` with content that looks something like this:

```
.
|-- test/
    |-- a3.txt
    |-- alpha/
    |   |-- a1.txt
    |   |-- delta/
    |       |-- d1.txt
    |       |-- d2.txt
    |-- beta/
        |-- b1.txt
        |-- gamma/
            |-- a2.txt
            |-- a3.txt
```

## LICENSE

MIT &copy; Sam Liebl 2024.
npm package: @samline/debounce
Description: A multi-entrypoint debounce utility for vanilla JavaScript, React, Vue, Svelte, and browser globals.
Latest version: 0.1.0

# @samline/debounce

A debounce utility with a shared core and dedicated entrypoints for vanilla JavaScript, React, Vue, Svelte, and direct browser usage.

## Table of Contents

- [Installation](#installation)
- [CDN / Browser](#cdn--browser)
- [Entrypoints](#entrypoints)
- [Quick Start](#quick-start)
- [API](#api)
- [Supported Locales](#supported-locales)
- [Documentation](#documentation)
- [License](#license)

## Installation

```bash
npm install @samline/debounce
```

```bash
pnpm add @samline/debounce
```

```bash
yarn add @samline/debounce
```

```bash
bun add @samline/debounce
```

## CDN / Browser

Use the browser bundle directly when you do not want a bundler.

```html
<script src="https://unpkg.com/@samline/debounce@0.1.0/dist/browser/debounce.global.js"></script>
```

```html
<script src="https://cdn.jsdelivr.net/npm/@samline/debounce@0.1.0/dist/browser/debounce.global.js"></script>
```

The global build exposes `window.Debounce`.

## Entrypoints

| Import | Purpose |
| --- | --- |
| `@samline/debounce` | Root debounce API |
| `@samline/debounce/vanilla` | Explicit vanilla entrypoint |
| `@samline/debounce/react` | React hooks for callbacks and values |
| `@samline/debounce/vue` | Vue composables for callbacks and refs |
| `@samline/debounce/svelte` | Svelte helpers and stores |
| `dist/browser/debounce.global.js` | Browser global bundle exposing `window.Debounce` |

## Quick Start

The root import exposes the shared debounce API.

```ts
import { debounce } from "@samline/debounce";

const save = debounce(
  (value: string) => {
    console.log("saved", value);
  },
  200,
  { leading: false, trailing: true, maxWait: 1000 }
);

save("hello");
save.cancel();
```

You can force a pending invocation immediately:

```ts
const commit = debounce(saveToServer, 300);

commit("draft");
commit.flush();
```

## API

The root and vanilla entrypoints export:

- `debounce`
- `createDebounce`
- `DebounceOptions`
- `DebouncedFunction`

### debounce

```ts
debounce(fn, wait, options?)
```

Creates a debounced function that delays execution until the configured wait window is satisfied.

### DebounceOptions

- `leading`: invoke on the first call in a debounce window
- `trailing`: invoke after the last call in a debounce window
- `maxWait`: force execution after a maximum delay even if calls keep arriving

### DebouncedFunction

Every debounced function exposes:

- `cancel()`: drops the pending invocation
- `flush()`: executes the pending invocation immediately and returns its result when available

## Supported Locales

This package is locale-independent. It does not ship locale tables, translations, or locale-specific behavior.

## Documentation

Framework-specific usage is documented in:

- [docs/vanilla.md](docs/vanilla.md)
- [docs/react.md](docs/react.md)
- [docs/vue.md](docs/vue.md)
- [docs/svelte.md](docs/svelte.md)
- [docs/browser.md](docs/browser.md)

## License

MIT. See [LICENSE](LICENSE).
npm package: @samline/drawer
Description: A universal drawer package for React, Vue, Svelte, vanilla JS, and browser usage.
Author: Samuel Olvera
Latest version: 2.0.8

# Drawer

A universal drawer package with one shared interaction runtime across React, Vue, Svelte, vanilla JS, and browser/CDN usage.

Drawer is inspired by [Vaul](https://github.com/emilkowalski/vaul). The package keeps the original drawer interaction model while making the same user-facing behavior available through different integration styles.

## Installation

```bash
npm install @samline/drawer
```

```bash
bun add @samline/drawer
```

## Quick Start

```ts
import '@samline/drawer/styles.css'
import { createDrawer } from '@samline/drawer'

const drawer = createDrawer({
  direction: 'bottom',
  dismissible: true,
  triggerText: 'Open drawer',
  showHandle: true,
  ariaLabel: 'Filters drawer',
  content: 'Drawer content'
})

drawer.setOpen(true)
```

## Entrypoints

- `@samline/drawer`: vanilla API and shared runtime helpers
- `@samline/drawer/react`: React component API
- `@samline/drawer/browser`: browser global for CDN or plain HTML
- `@samline/drawer/vue`: Vue wrapper over the shared runtime
- `@samline/drawer/svelte`: Svelte action and helpers
- `@samline/drawer/core`: controller and snapshot contracts only
- `@samline/drawer/styles.css`: shared styles

## Full Docs

Use docs/ when you want the full API surface, lifecycle notes, runtime attributes, and framework-specific guidance.

- [docs/README.md](docs/README.md)
- [docs/api.md](docs/api.md)
- [docs/vanilla.md](docs/vanilla.md)
- [docs/browser.md](docs/browser.md)
- [docs/react.md](docs/react.md)
- [docs/vue.md](docs/vue.md)
- [docs/svelte.md](docs/svelte.md)

## Notes

- All entrypoints target the same user-facing drawer behavior for shared options.
- When `shouldScaleBackground` is enabled, add `data-drawer-wrapper` to the app shell element that should scale.
- When a child control should not start dragging, add `data-drawer-no-drag` to that element.
- The public DOM contract uses `data-drawer-*` attributes.

## License

MIT
npm package: @samline/notify
Description: A universal toast notification package for React, Vue, Svelte, vanilla JS, and browser/CDN usage.
Author: Samuel Olvera
Latest version: 2.0.3

# Notify

A universal toast notification library. Built for teams who need Sonner quality and API, but require seamless integration across multiple frameworks.

Notify is a toast package inspired by [Sonner](https://github.com/emilkowalski/sonner). The intention is to complement that work and experiment with a shared runtime for React, Vue, Svelte, vanilla JS, and browser/CDN usage.

## Table of Contents

- [Installation](#installation)
- [Entrypoints](#entrypoints)
- [Quick Start](#quick-start)
- [Documentation](#documentation)
- [Scripts](#scripts)
- [License](#license)

## Installation

```bash
npm install @samline/notify
```

```bash
bun add @samline/notify
```

## Entrypoints

| Entrypoint                   | Use                   |
| ---------------------------- | --------------------- |
| `@samline/notify`            | Main vanilla API      |
| `@samline/notify/browser`    | Browser global bundle |
| `@samline/notify/react`      | React adapter         |
| `@samline/notify/vue`        | Vue adapter           |
| `@samline/notify/svelte`     | Svelte adapter        |
| `@samline/notify/styles.css` | Shared styles export  |

## Quick Start

```ts
import { createToaster, toast } from '@samline/notify'

createToaster({ position: 'bottom-right', richColors: true })

toast.success('Saved')
```

## Documentation

Use the dedicated docs when you want the full API or a framework-specific guide.

- [docs/README.md](docs/README.md)
- [docs/api.md](docs/api.md)
- [docs/vanilla.md](docs/vanilla.md)
- [docs/browser.md](docs/browser.md)
- [docs/react.md](docs/react.md)
- [docs/vue.md](docs/vue.md)
- [docs/svelte.md](docs/svelte.md)

## License

MIT
npm package: @samloh84/parse-gitlab-webhook
Description: Node.js Parse GitLab Webhook
Author: Samuel Loh Yin Kang
Latest version: 2.0.4

### Node.js Parse GitLab Webhook

This GitLab Webhook event parser processes GitLab events into messages.




### References
[GitLab Documentation: Webhook Events](https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html)
npm package: @samlou123/n8n-nodes-g-sheet-reader
Description: Starter package for creating n8n nodes
Author: Jane Doe
Latest version: 0.1.1

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

# n8n-nodes-starter

This repo contains example nodes to help you get started building your own custom integrations for [n8n](https://n8n.io). It includes the node linter and other dependencies.

To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).

If you would like your node to be available on n8n cloud you can also [submit your node for verification](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/).

## Prerequisites

You need the following installed on your development machine:

* [git](https://git-scm.com/downloads)
* Node.js and npm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
* Install n8n with:
  ```
  npm install n8n -g
  ```
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).

## Using this starter

These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).

1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
2. Clone your new repo:
   ```
   git clone https://github.com/<your organization>/<your-repo-name>.git
   ```
3. Run `npm i` to install dependencies.
4. Open the project in your editor.
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
6. Update the `package.json` to match your details.
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
10. Update the LICENSE file to use your details.
11. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.

## More information

Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.

## License

[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
npm package: @samlou123/n8n-nodes-starter
Description: Starter package for creating n8n nodes
Author: Jane Doe
Latest version: 0.1.1

![Banner image](https://user-images.githubusercontent.com/10284570/173569848-c624317f-42b1-45a6-ab09-f0ea3c247648.png)

# n8n-nodes-starter

This repo contains example nodes to help you get started building your own custom integrations for [n8n](https://n8n.io). It includes the node linter and other dependencies.

To make your custom node available to the community, you must create it as an npm package, and [submit it to the npm registry](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry).

If you would like your node to be available on n8n cloud you can also [submit your node for verification](https://docs.n8n.io/integrations/creating-nodes/deploy/submit-community-nodes/).

## Prerequisites

You need the following installed on your development machine:

* [git](https://git-scm.com/downloads)
* Node.js and npm. Minimum version Node 20. You can find instructions on how to install both using nvm (Node Version Manager) for Linux, Mac, and WSL [here](https://github.com/nvm-sh/nvm). For Windows users, refer to Microsoft's guide to [Install NodeJS on Windows](https://docs.microsoft.com/en-us/windows/dev-environment/javascript/nodejs-on-windows).
* Install n8n with:
  ```
  npm install n8n -g
  ```
* Recommended: follow n8n's guide to [set up your development environment](https://docs.n8n.io/integrations/creating-nodes/build/node-development-environment/).

## Using this starter

These are the basic steps for working with the starter. For detailed guidance on creating and publishing nodes, refer to the [documentation](https://docs.n8n.io/integrations/creating-nodes/).

1. [Generate a new repository](https://github.com/n8n-io/n8n-nodes-starter/generate) from this template repository.
2. Clone your new repo:
   ```
   git clone https://github.com/<your organization>/<your-repo-name>.git
   ```
3. Run `npm i` to install dependencies.
4. Open the project in your editor.
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
6. Update the `package.json` to match your details.
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
10. Update the LICENSE file to use your details.
11. [Publish](https://docs.npmjs.com/packages-and-modules/contributing-packages-to-the-registry) your package to npm.

## More information

Refer to our [documentation on creating nodes](https://docs.n8n.io/integrations/creating-nodes/) for detailed information on building your own nodes.

## License

[MIT](https://github.com/n8n-io/n8n-nodes-starter/blob/master/LICENSE.md)
npm package: @samluvanda/uploadx
Description: Modern, lightweight, and extensible JavaScript file uploader supporting chunked uploads, filtering, retry logic, progress tracking, and event hooks.
Author: Samson Luvanda
Latest version: 1.0.1

# UploadX

**UploadX** is a modern, configurable, HTML5-powered JavaScript file uploader library. It supports chunked uploads, customizable filters, progress tracking, and more — all in a lightweight and extensible package.

![badge](https://img.shields.io/badge/uploadx-lightweight-blue)

---

## 🚀 Features

- ✅ **Modern JavaScript (ES6+)**
- 🔄 **Chunked Upload Support** — break large files into smaller chunks for better reliability
- 🔌 **Configurable & Extensible** — customize filters, events, headers, size limits, retry logic, and more
- 🧠 **Smart Queue Management** — automatic progress, retries, and clean error handling
- 🎯 **HTML5 File API** — no legacy code or Flash dependencies
- 🔊 **Rich Event System** — hook into all stages of the upload process

---

## 📦 Installation

```bash
npm install @samluvanda/uploadx
```

---

## ✍️ Usage

```js
import { Uploader } from 'uploadx';

const uploader = new Uploader({
  browse_button: 'browseBtn',
  url: '/upload',
  filters: {
    mime_types: [{ title: 'Images', extensions: 'jpg,jpeg,png,gif' }],
    max_file_size: '5mb',
    prevent_duplicates: true
  },
  chunk_size: '1mb',
  max_retries: 3,
  multi_selection: true,
});

uploader.bind('FileUploaded', (up, file, response) => {
  console.log(`Uploaded: ${file.name}`, response);
});

document.getElementById('startBtn').onclick = () => uploader.start();
```

---

## 📁 Documentation

See [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md)

---

## 🤝 Contributing

We welcome PRs, issues, and enhancements. Please read our [contributing guide](docs/CONTRIBUTING.md).

---

## 🫣 Sponsor This Project

If UploadX made your life easier, consider [sponsoring me on GitHub](https://github.com/sponsors/samluvanda). I promise not to use the funds on things like... more coffee ☕ (okay, maybe just a little).

---

## 🌐 Third-Party Upload Handlers

Several third-party handlers for UploadX exist and may be useful for integration with different backend platforms.  
**Please note:** These are external community projects. The UploadX project does not maintain or endorse them.

- **Laravel:** [uploadx-laravel](https://github.com/samluvanda/uploadx-laravel)

Want to contribute your own handler? Open a pull request to list it here.

---

## 🧪 Browser Compatibility

UploadX uses the HTML5 File API and is compatible with all major modern browsers.

---

## 📄 License

MIT © 2025 [Samson Luvanda](mailto:s_luvanda@hotmail.com)
npm package: @sammacbeth/dat-seeder
Description: Seed multiple dats
Author: Sam Macbeth
Latest version: 0.8.1

## @sammacbeth/dat-seeder

A CLI tool for seeding several dats from a single machine.

### Install

```
npm install -g @sammacbeth/dat-seeder
```

### Usage

```bash
$ dat-seeder --help
Usage: dat-seeder [options] [addresses...]

Options:
  -f --file <dats>          File containing a list of dats to seed
  -d --cachedir <cachedir>  Folder to store dats (default: "./dat")
  -p --port <port>          Swarm listen port
  -h, --help                output usage information
```

You can either specify dat addresses to seed from the command line, or provide
a file that contains addresses on each line:

```bash
dat-seeder dat.foundation sammacbeth.eu
```

or

```bash
printf "dat.foundation\nsammacbeth.eu" > dats.txt
dat-seeder -f dats.txt
```

### License

MIT
npm package: @sammacbeth/dat-shared-doc
Description: Yjs Shared types on Dat
Author: Sam Macbeth
Latest version: 1.0.3

# Dat-Shared-Doc

[Yjs](https://github.com/yjs/yjs) shared types, with changes persisted and synchronised using Dat's
[Hypercores](https://github.com/mafintosh/hypercore/).

## Features

 * Multi-writer data structures on top of Dat, with support for both node and browsers, and history persisted to Hypercores.
 * Fine-grained control of which peers can write and add new peers.
 * Support for yjs presence, to synchronise information about online peers.

Note this library does not include a discovery component for finding and connecting to peers. You
can use [hyperswarm](https://github.com/hyperswarm/hyperswarm/) or
[discovery-swarm-webrtc](https://github.com/geut/discovery-swarm-webrtc) for this purpose.

## Usage

_WARNING: API not yet stable!_

```javascript
const { DatYDoc } = require('@sammacbeth/dat-shared-doc');
const Corestore = require('corestore')
const ram = require('random-access-memory')
const pump = require('pump')

const opts = {
  announceFeeds: true, // automatically discovery of other peers
  policy: 'GRANT_ALL_ADMIN', // every peer can write and add other peers
}
// create a new shared document
const doc1 = await DatYDoc.create(new Corestore(ram), opts)
const address = doc1.key.toString('hex'); // address of this document
await doc1.ready
// insert some text
doc1.doc.transact(() => {
  doc1.doc.getText("text").insert(0, "world");
});

// create read only copy
const doc2 = await DatYDoc.load(address, new Corestore(ram), opts);

// synchronise the corestores
const repl = doc1.store.replicate(true, { live: true })
pump(repl, doc2.store.replicate(false, { live: true }), repl);

// wait to be granted writer permissions
doc2.multicore.once('writer', () => {
  // read state of the document
  console.log(doc2.doc.getText('text').toJSON()) //= 'world'
  // update the doc
  doc2.doc.transact(() => {
    doc2.doc.getText("text").insert(0, "hello ");
  });

  // observe the update from the original
  doc1.doc.on('update', () => {
    console.log(doc1.doc.getText('text').toJSON()) //= 'hello world'
  })
})
```

## License

MIT
npm package: @sammacbeth/libdwebify
Description: This is a [Browserify](https://github.com/browserify/browserify) transform, which replaces some node libraries with [libdweb](https://github.com/mozilla/libdweb) polyfills. This makes your node networking stack run in Firefox!
Author: Sam Macbeth
Latest version: 1.0.2

# libdwebify

This is a [Browserify](https://github.com/browserify/browserify) transform, which replaces some
node libraries with [libdweb](https://github.com/mozilla/libdweb) polyfills. This makes your
node networking stack run in Firefox!

Current replaced modules:
 * `net`
 * `dgram`
 * `dns`

## Install

```bash
npm install --save-dev @sammacbeth/libdwebify
```

## Usage

Pass it to browserify with either `-t` to just replace in top-level files, or `-g` to also replace
imports in dependencies:

```bash
browserify -e my_app.js -g @sammacbeth/libdwebify > bundle.js
```

Note, you will still have to add the libdweb experimental APIs in your extension manifest.

## License

MIT
npm package: @sammacbeth/node-dgram
Description: Node dgram module adapter for libdweb
Latest version: 0.0.3

# node-dgram

[![travis][travis.icon]][travis.url]
[![package][version.icon] ![downloads][downloads.icon]][package.url]
[![styled with prettier][prettier.icon]][prettier.url]

Library allows Firefox extensions to polyfill node [dgram](https://nodejs.org/api/dgram.html)module using [libdweb][].

## Usage

```js
import drgamify from "@libdweb/node-dgram"
const dgram = drgamify(browser)
```

## Install

    npm install @libdweb/node-dgram

## Hack

You can run example from test directory by running `npm run demo` after `npm install`

[travis.icon]: https://travis-ci.org/Gozala/node-dgram.svg?branch=master
[travis.url]: https://travis-ci.org/Gozala/node-dgram
[version.icon]: https://img.shields.io/npm/v/node-dgram.svg
[downloads.icon]: https://img.shields.io/npm/dm/node-dgram.svg
[package.url]: https://npmjs.org/package/node-dgram
[downloads.image]: https://img.shields.io/npm/dm/node-dgram.svg
[downloads.url]: https://npmjs.org/package/node-dgram
[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
[prettier.url]: https://github.com/prettier/prettier
[libdweb]: https://github.com/mozilla/libdweb/
npm package: @sammacbeth/random-access-idb-mutable-file
Description: random-access-storage provider via non-standard IDBMutableFile API
Author: Irakli Gozalishvili
Latest version: 0.1.1

# random-access-idb-mutable-file

[![travis][travis.icon]][travis.url]
[![package][version.icon] ![downloads][downloads.icon]][package.url]
[![styled with prettier][prettier.icon]][prettier.url]

[random-access][random-access-storage] storage layer over [IDBMutableFile][], which is **non-standard** IndexedDB extension in Gecko to provide virtual file system API with-in the IndexedDB.

This library will only work in Firefox (unless other browsers implement [IDBMutableFile][] API) and it's mostly targeted at [WebExtensions][]. It mostly amis to be a drop-in replacement for [random-access-file][]. It is also an alternative to [random-access-idb][] that is able to avoid loading all of the file content for random read / writes at the expanse of limited runtime suport.

## Usage

```js
import RandomAccess from "random-access-idb-mutable-file"

const main = async (filename, options) => {
  const randomAccessFile = await RandomAccess.mount()

  const file = randomAccessFile(filename, options)
  file.write(10, Buffer.from("hello"), error => {
    // write a buffer to offset 10
    file.read(10, 5, (error, buffer) => {
      console.log(buffer) // read 5 bytes from offset 10
      file.close(() => {
        console.log("file is closed")
      })
    })
  })
}
```

## Install

    npm install random-access-idb-mutable-file

[travis.icon]: https://travis-ci.org/Gozala/random-access-idb-mutable-file.svg?branch=master
[travis.url]: https://travis-ci.org/Gozala/random-access-idb-mutable-file
[version.icon]: https://img.shields.io/npm/v/random-access-idb-mutable-file.svg
[package.url]: https://npmjs.org/package/random-access-idb-mutable-file
[downloads.icon]: https://img.shields.io/npm/dm/random-access-idb-mutable-file.svg
[downloads.url]: https://npmjs.org/package/random-access-idb-mutable-file
[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
[prettier.url]: https://github.com/prettier/prettier
[random-access-storage]: https://github.com/random-access-storage/random-access-storage
[random-access-file]: https://github.com/random-access-storage/random-access-file
[idbmutablefile]: https://developer.mozilla.org/en-US/docs/Web/API/IDBMutableFile
[webextensions]: https://developer.mozilla.org/en-US/Add-ons/WebExtensions
[random-access-idb]: https://github.com/random-access-storage/random-access-idb
npm package: @sammacbeth/tape-ext
Description: A command line tool (inspired by tape) to test web extensions
Author: Irakli Gozalishvili
Latest version: 0.5.1

# tape-ext

[![travis][travis.icon]][travis.url]
[![package][version.icon] ![downloads][downloads.icon]][package.url]
[![styled with prettier][prettier.icon]][prettier.url]

A command line tool (inspired by [tape][]) can be used to test Firefox [web extensions][].
It starts Firefox in [headless mode][] using [Web Driver][] and [install temporary][] test [web extensions][] that are assumed to produce [TAP][] output. You can use [libdweb][] experimental `test` API which is API compatible with [tape][] for writing tests.

## Usage

You can run test web extension by running `tape-ext` from it's directory (directory containing `manifest.json` file) or you could pass [glob][] to test multiple web-extensions.

```
tape-ext "test/*/manifest.json"
```

You can find usage examples at [libdweb][] repository.

[travis.icon]: https://travis-ci.com/Gozala/tape-ext.svg?branch=master
[travis.url]: https://travis-ci.com/Gozala/tape-ext
[version.icon]: https://img.shields.io/npm/v/tape-ext.svg
[package.url]: https://npmjs.org/package/tape-ext
[downloads.icon]: https://img.shields.io/npm/dm/tape-ext.svg
[downloads.url]: https://npmjs.org/package/tape-ext
[prettier.icon]: https://img.shields.io/badge/styled_with-prettier-ff69b4.svg
[prettier.url]: https://github.com/prettier/prettier
[tape]: https://github.com/substack/tape
[web extensions]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions
[glob]: https://www.npmjs.com/package/glob
[headless mode]: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode
[web driver]: https://developer.mozilla.org/en-US/docs/Web/WebDriver
[install temporary]: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Temporary_Installation_in_Firefox
[tap]: https://testanything.org/
[libdweb]: https://github.com/mozilla/libdweb
npm package: @sammacbeth/types
Description: This project contains some TypeScript definitions for currently untyped libraries. Definitions may not be complete.
Author: Sam Macbeth
Latest version: 1.1.1

This project contains some TypeScript definitions for currently untyped libraries. Definitions may not be complete.

## Usage

### Hypercore

Add the following to your project's `types.d.ts` file:

```typescript
declare module 'hypercore' {
  import Hypercore from "@sammacbeth/types/hypercore"
  export = Hypercore
}
```

### Hyperdrive

```typescript
declare module 'hyperdrive' {
  import Hyperdrive from '@sammacbeth/types/hyperdrive';
  export = Hyperdrive
}
```
npm package: @sammacbeth/utp-wasm
Description: Emscripten WASM build of libutp
Author: Mathias Buus
Latest version: 1.1.5

# utp-wasm

An emscripten WASM build of libutp, as an alternative
to utp-native when you are in an enviroment where you cannot load
a native extension

NOTE: This is much slower than the native binding

## Usage

```js
const utp = require('utp-wasm')

const sock = utp()

sock.on('connection', function (connection) {
  // a simple echo server
  connection.pipe(connection)
})

sock.listen(20000)
```

## API

Shares the same api as [utp-native](http://github.com/mafintosh/utp-native).

## Building

To build this first fetch the libutp dep

```sh
npm run fetch-libutp
```

Then install emscripten and do

```sh
npm run emscripten
```

## License

MIT
npm package: @sammachin/buildhat-nodered
Description: Node RED package for the Raspberry Pi Build HAT
Author: Sam Machin
Latest version: 0.0.3

# RaspberryPi BuildHAT

Nodes to interact with Lego Motors and Sensors connected to the RaspberryPI [BuildHAT](https://www.raspberrypi.com/documentation/accessories/build-hat.html)

This project is still work in progress, as I get hold of more devices I will be able to add new nodes.

The command node allows for sending of raw serial commands to the hat as per the interface spec, all lines recived from the hat will be sent out by this node. (Including commands/to from other nodes) It is mostly useful for development and advanced features.

If you have any of the lego devices on [this table](https://www.raspberrypi.com/documentation/accessories/build-hat.html#device-compatibility) and could run the example flow `device_list.json` please send me the output I will endevour to add a node for that device.


You _may_ need to run a new hat with the officail RaspberryPi python code at least once to setup the firmware on the hat as this package does not (yet) support that. If anyone has a brand new hat they can try this pacakge on first and report back results that would be appreciated.
npm package: @sammachin/node-red-dragonpbx
Description: A Node-RED node to append JSON objects to an array in msg.callScript
Author: Sam Machin
Latest version: 1.1.2

# node-red-contrib-json-appender

A Node-RED node that appends a JSON object to an array in msg.callScript.

## Installation

Run the following command in your Node-RED user directory (typically ~/.node-red):

```
npm install node-red-contrib-json-appender
```

## Usage

1. Add the "JSON Appender" node to your flow.
2. Configure the JSON object to append.
3. Set whether to create the array if it's missing.
4. Connect the node to your flow.

## Features

- Append a predefined JSON object to an array in msg.callScript
- Option to create the array if it doesn't exist
- Validation of the JSON object during configuration

## Example

Here's a basic example of how to use this node:

1. Inject a message with a payload
2. Pass it through the JSON Appender node configured with your desired JSON object
3. The JSON object will be appended to msg.callScript

## License

MIT
npm package: @sammaji/shellchat
Description: A simple npm package to chat with your friends, in your terminal.
Author: Samyabrata Maji
Latest version: 1.0.1

# typescript-cli-starter

A simple and zero-opinion typescript starter template for building cross-platform command line applications.

![GitHub package.json dynamic](https://img.shields.io/github/package-json/keywords/khalidx/typescript-cli-starter.svg?style=flat-square)

![GitHub](https://img.shields.io/github/license/khalidx/typescript-cli-starter.svg?style=flat-square)
![GitHub package.json version](https://img.shields.io/github/package-json/v/khalidx/typescript-cli-starter.svg?style=flat-square)
![GitHub top language](https://img.shields.io/github/languages/top/khalidx/typescript-cli-starter.svg?style=flat-square)

![GitHub last commit](https://img.shields.io/github/last-commit/khalidx/typescript-cli-starter.svg?style=flat-square)

Includes:

- [TypeScript](https://www.typescriptlang.org/), for writing good code
- [Ava](https://www.npmjs.com/package/ava), for writing good tests
- [Commander](https://www.npmjs.com/package/commander), for building CLI applications
- [Pkg](https://www.npmjs.com/package/pkg), for building cross-platform native executables

Your application will be installable from `npm` or by sharing your native executables.

## Usage

### **dev**

`npm run dev`

Runs the CLI application.

You can pass arguments to your application by running `npm run dev -- --your-argument`. The extra `--` is so that your arguments are passed to your CLI application, and not `npm`.

### **clean**

`npm run clean`

Removes any built code and any built executables.

### **build**

`npm run build`

Cleans, then builds the TypeScript code.

Your built code will be in the `./dist/` directory.

### **test**

`npm run test`

Cleans, then builds, and tests the built code.

### **bundle**

`npm run bundle`

Cleans, then builds, then bundles into native executables for Windows, Mac, and Linux.

Your shareable executables will be in the `./exec/` directory.