open-index/open-npm huggingface dataset:
npm package: @solid-primitives/throttle
Description: Primitive that creates a throttle function
Author: David Di Biase
Latest version: 1.2.0
Deprecated: throttle primitive moved to @solid-primitives/scheduled

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Throttle" alt="Solid Primitives Throttle">
</p>

# @solid-primitives/throttle

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=for-the-badge)](https://lerna.js.org/)
[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/throttle?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/throttle)
[![size](https://img.shields.io/npm/v/@solid-primitives/throttle?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/throttle)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

Creates a throttled function that invokes at most once per specified time.

When used in an reactive context (effect or component), any throttled function pending to execute will be automatically canceled when the context is cleaned up.

## How to use it

```ts
const [trigger, clear] = createThrottle((value) => console.log(value), 250));
trigger('my-new-value');
```

## Demo

You may view a working example here: https://codesandbox.io/s/solid-primitives-throttle-h2wni?file=/src/index.tsx

## Changelog

<details>
<summary><b>Expand Changelog</b></summary>

0.0.100

First version of the throttle primitive.

1.0.3

Cleaned up return types and documentation.

1.0.8

Adding CJS support to package.

1.1.0

Updated to Solid 1.3

1.1.3

General clean-up and improvements by Joe Pea (trusktr)

</details>
npm package: @solid-primitives/trigger
Description: A set of primitives based on Solid signals, used to trigger computations.
Author: Damian Tarnawski
Latest version: 1.2.3

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=trigger" alt="Solid Primitives trigger">
</p>

# @solid-primitives/trigger

[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/trigger?style=for-the-badge&label=size)](https://bundlephobia.com/package/@solid-primitives/trigger)
[![version](https://img.shields.io/npm/v/@solid-primitives/trigger?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/trigger)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-1.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

A set of primitives based on Solid signals, used to trigger computations.

- [`createTrigger`](#createtrigger) - Set listeners in reactive computations and then trigger them when you want.
- [`createTriggerCache`](#createtriggercache) - Creates a cache of triggers that can be used to mark dirty only specific keys.

## Installation

```bash
npm install @solid-primitives/trigger
# or
yarn add @solid-primitives/trigger
# or
pnpm add @solid-primitives/trigger
```

## `createTrigger`

Set listeners in reactive computations and then trigger them when you want.

### How to use it

```ts
import { createTrigger } from "@solid-primitives/trigger";

const [track, dirty] = createTrigger();

createEffect(() => {
  track();
  // ...
});

// later
dirty();
```

## `createTriggerCache`

Creates a cache of triggers that can be used to mark dirty only specific keys.

Cache is a `Map` or `WeakMap` depending on the `mapConstructor` argument. (default: `Map`)

If `mapConstructor` is `WeakMap` then the cache will be weak and the keys will be garbage collected when they are no longer referenced.

Trigger signals added to the cache only when tracked under a computation,
and get deleted from the cache when they are no longer tracked.

### How to use it

`track` and `dirty` are called with a `key` so that each tracker will trigger an update only when his individual `key` would get marked as dirty.

```ts
import { createTriggerCache } from "@solid-primitives/trigger";

const map = createTriggerCache<number>();

createEffect(() => {
  map.track(1);
  //  ...
});

// later
map.dirty(1);
// this won't cause an update:
map.dirty(2);
```

### Triggering all keys

`dirtyAll` will trigger all keys in the cache.

```ts
const [track, _dirty, dirtyAll] = createTriggerCache<number>();

createEffect(() => {
  track(1);
  //  ...
});

// later (will trigger the update)
dirtyAll();
```

### Weak version

`createTriggerCache` constructor can take a `WeakMap` constructor as an argument. This will create a `WeakMap` of triggers instead of a `Map`.

```ts
const map = createTriggerCache<object>(WeakMap);

const obj = {};

createEffect(() => {
  map.track(obj);
  //  ...
});

// later
map.dirty(obj);
```

## Demo

TODO

## Changelog

See [CHANGELOG.md](./CHANGELOG.md)
npm package: @solid-primitives/tween
Description: Primitive that creates tween functions
Author: Ryan Carniato
Latest version: 1.4.1

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Tween" alt="Solid Primitives Tween">
</p>

# @solid-primitives/tween

[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/tween?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/tween)
[![size](https://img.shields.io/npm/v/@solid-primitives/tween?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/tween)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

Creates an efficient tweening derived signal that smoothly transitions
a given signal from its previous value to its next value whenever it changes.

## Installation

```
npm install @solid-primitives/tween
# or
yarn add @solid-primitives/tween
```

## How to use it

```ts
import { createSignal } from "solid-js";
import { createTween } from "@solid-primitives/tween";

const [value, setValue] = createSignal(0);
const tweenedValue = createTween(value, { duration: 500 });

setMyNumber(100);
// tweenedValue will now smoothly transition from 0 to 100 over 500 ms
```

## Definition

```ts
function createTween(
  target: Accessor<number>,
  options: {
    duration?: number = 100; // ms
    easing?: (t: number) => number = (t) => t;
  }
): Accessor<number>;
```

`target` can be any reactive value (signal, memo, or function that calls such).
For example, to use a component prop, specify `() => props.value`.

You can provide two options:

- `duration` is the number of milliseconds to perform the transition
  from the previous value to the next value. Defaults to 100.
- `easing` is a function that maps a number between 0 and 1 to a number
  between 0 and 1, to speed up or slow down different parts of the transition.
  The default easing function `(t) => t` is linear (no easing).
  A common choice is `(t) => 0.5 - Math.cos(Math.PI * t) / 2`.

Internally, `createTween` uses
[`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame)
to smoothly update the tweened value at the display refresh rate.
After the tweened value reaches the underlying signal value,
it will stop updating via `requestAnimationFrame` for efficiency.

## Changelog

See [CHANGELOG.md](./CHANGELOG.md)
npm package: @solid-primitives/upload
Description: Primitives for uploading files.
Author: Rustam Ashurmatov
Latest version: 0.1.4

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Upload" alt="Solid Primitives Upload">
</p>

# @solid-primitives/upload

[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/upload?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/upload)
[![size](https://img.shields.io/npm/v/@solid-primitives/upload?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/upload)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

Primitive to make uploading files and making dropzones easier.

## Installation

```bash
npm install @solid-primitives/upload
# or
yarn add @solid-primitives/upload
```

## How to use it

### [createFileUploader](#createfileuploader)

```ts
// single files
const { files, selectFiles } = createFileUploader();
selectFiles([file] => console.log(file));

// multiple files
const { files, selectFiles } = createFileUploader({ multiple: true, accept: "image/*" });
selectFiles(files => files.forEach(file => console.log(file)));
```

### use:fileUploader directive

```ts
const [files, setFiles] = createSignal<UploadFile[]>([]);

<input
  type="file"
  multiple
  use:fileUploader={{
    userCallback: fs => fs.forEach(f => console.log(f)),
    setFiles,
  }}
/>;
```

### [createDropzone](#createdropzone)

```html
<div
  ref={dropzoneRef}
  style={{ width: "100px", height: "100px", background: "red" }}>
  Dropzone
</div>
```

```ts
const { setRef: dropzoneRef, files: droppedFiles } = createDropzone({
  onDrop: async files => {
    await doStuff(2);
    files.forEach(f => console.log(f));
  },
  onDragStart: files => files.forEach(f => console.log(f)),
  onDragOver: files => console.log("drag over"),
});
```

## Demo

Working example: https://primitives.solidjs.community/playground/upload
Source code: https://github.com/solidjs-community/solid-primitives/blob/main/packages/upload/dev/index.tsx

## Changelog

See [CHANGELOG.md](./CHANGELOG.md)
npm package: @solid-primitives/visibility-observer
Description: Primitive to track page visibility
Author: David Di Biase
Latest version: 2.0.1
Deprecated: Package has been renamed to @solid-primitives/page-visibility

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Visibility%20Observer" alt="Solid Primitives Visibility Observer">
</p>

# @solid-primitives/visibility-observer

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=for-the-badge)](https://lerna.js.org/)
[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/visibility-observer?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/visibility-observer)
[![size](https://img.shields.io/npm/v/@solid-primitives/visibility-observer?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/visibility-observer)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

- [`createPageVisibility`](#createPageVisibility) - Creates a signal with a boolean value identifying the page visibility state
- [`usePageVisibility`](#usePageVisibility) - A [shared-root](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createSharedRoot) alternative.

## Installation

```
npm install @solid-primitives/visibility-observer
# or
yarn add @solid-primitives/visibility-observer
```

## `createPageVisibility`

Creates a signal with a boolean value identifying the page visibility state.

### How to use it

```ts
import { createPageVisibility } from "@solid-primitives/visibility-observer";

const visible = createPageVisibility();

createEffect(() => {
  visible(); // => boolean
});
```

## `usePageVisibility`

`usePageVisibility` is a [shared root](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createSharedRoot) primitive. It is providing the same signal as `createPageVisibility`, but the event-listener and the signal are shared between dependents, making it more optimized to use in multiple places at once.

### How to use it

```ts
import { usePageVisibility } from "@solid-primitives/visibility-observer";

const visible = usePageVisibility();

createEffect(() => {
  visible(); // => boolean
});
```

## Changelog

<details>
<summary><b>Expand Changelog</b></summary>

1.0.0

Initial commit of the visibility observer.

2.0.0

Rename `createPageVisibilityObserver` to `createPageVisibility` _(no longer exported as default)_

Add `usePageVisibility`

</details>
npm package: @solid-primitives/workers
Description: Primitives that support creating Web Workers.
Author: David Di Biase
Latest version: 0.4.3

<p>
  <img width="100%" src="https://assets.solidjs.com/banner?type=Primitives&background=tiles&project=Workers" alt="Solid Primitives Workers">
</p>

# @solid-primitives/workers

[![size](https://img.shields.io/bundlephobia/minzip/@solid-primitives/workers?style=for-the-badge)](https://bundlephobia.com/package/@solid-primitives/workers)
[![size](https://img.shields.io/npm/v/@solid-primitives/workers?style=for-the-badge)](https://www.npmjs.com/package/@solid-primitives/workers)
[![stage](https://img.shields.io/endpoint?style=for-the-badge&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives#contribution-process)

A set of utility to support using Web Workers and Shared Workers:

`createWorker` - Provides a getter and setter for the primitive.

`createWorkerPool` - Creates a pool of workers and round-robins requests between each.

`createSignaledWorker` - Creates a work with that reads and writes to signals.

## How to use it

### createWorker

Create a basic web worker:

```ts
const [worker, start, stop] = createWorker(function add(a, b) {
  return a + b;
});
console.log(await worker.add(1, 2));
// output: 3
```

### createWorkerPool

Create a worker pool with a set concurrency:

```ts
const [pool, start, stop] = createWorkerPool(4, function add(a, b) {
  return a + b;
});
console.log(await pool.add(1, 2));
// output: 3
```

### createSignaledWorker

Create a more advanced worker that accepts multiple instructional inputs:

```ts
const [input, setInput] = createSignal([1, 1]);
const [output, setOutput] = createSignal([1, 1]);
createSignaledWorker({
  input,
  output: setOutput,
  func: function add([a, b]) {
    return a + b;
  },
});
setInput([1, 2]);
console.log(output());
// output: 3
```

## Demo

You may view a working example here: [ link to Stackblize or CodeSandBox ]

## Changelog

See [CHANGELOG.md](./CHANGELOG.md)

## Inspiration

Inspired by Jason Miller's worker function. Borrows the RPC and function export method.
npm package: @solid-reach/rollup-plugin-jsx
Description: A rollup plugin to handle JSX
Author: Pablo Berganza
Latest version: 0.0.4

# @solid-reach/rollup-plugin-jsx

A package that keeps the JSX imports when bundled with Rollup, source code taken from [this issue](https://github.com/rollup/rollup/issues/2822#issuecomment-486676465).
npm package: @solid-rest/core
Description: treat any storage as a mini Solid server
Author: Jeff Zucker
Latest version: 2.1.19

# Solid REST

## treat any storage backend as a minimal Solid server

<!--
[![NPM](https://nodei.co/npm/solid-rest.png)](https://nodei.co/npm/solid-rest/)
-->

This package provides Solid access to local file systems and other storage spaces. It recieves standard Solid REST requests and returns the same kind of response a Solid server sends.  This means that libraries and apps can make a file:// or app:// request in the same way they make an https request without having to know anything about the backend and without needing a server on the backend.

### Using with rdflib

Solid-Rest is included automatically in [rdflib]() when a script is run outside a browser.  This means that commands such as fetcher.load('file:///somepath/container/') will behave, for most purposes just like the same command against an https URI on a Solid server (in this case, create an in-memory parsed version of the container's turtle representation).  

### Using with other libraries

Solid-Rest can be used with any other libraries capable of operating either outside a browser or in an express-wrapped browser.  For example, [solid-file-client]() uses solid-rest behind the scenes to support file transfers between local file systems and remote pods.


### Backends

**file://** - the local file system; works on command-line or in a browser within an electron process

**app://ls/** - an in-memory local storage; works on command-line or in a browser within an electron process

**app://bfs/** - any of the dozen or so storage mechanisms supported by [BrowserFS](https://github.com/jvilk/BrowserFS) - Dropbox, browser Local Storage, browser indexedDB, browser Native File Api, and more; works in a browser.

The file and in-memory storage are initialized automatically with the creation of the rest object.  The BrowserFS backends need to be initialized explicitly.  Please see tests/browser-test.html in the distribution for an example and details.

### Plugins

The package supports plugins, so new backends may be added by supplying the storage system specific commands without having to reinvent the wheel of receiving REST requests and responding to them in a Solid manner.  The src/localStorage.js package contains documentation on writing plugins.  Contact me for more info.

<img src="https://github.com/jeff-zucker/solid-rest/blob/master/solid-rest.png" alt="diagram of solid-rest">

### Acknowledgements

Thanks to [Otto-AA](https://github.com/Otto-AA) and [CxRes](https://github.com/CxRes) for advice and patches.

copyright &copy; 2019, 2020, [Jeff Zucker](https://github.com/jeff-zucker), may be freely distributed with the MIT license
npm package: @solid-rest/dropbox
Description: Solid-Rest plugin for Dropbox
Author: Jeff Zucker
Latest version: 1.0.6

# Solid-Rest-Dropbox

Treat your Dropbox storage as a Solid pod

**Warning** This library is in development and should be considered experimental at this time. If you run into problems, contact me on the Solid forum (@jeffz) or Gitter channel. (@jeff-zucker).

This library treats a Dropbox host as a serverless Solid Pod, accepting Solid requests (GET, PUT, etc.) and returning Solid responses (wac-allow headers, turtle representation of folders, etc.).

The library may be used stand-alone (see [tests](./tests/all.js) for examples).<!-- , or as a plugin to [Solid-Node-Client](https://github.com/solid/solid-node-client) from where it can be integrated into almost any Solid library or app.  Simply import Solid-Node-Client and thereafter use file:// URLs almost anywhere that https:// URLs work.  See the Solid-Node-Client documentation for details. -->

&copy; 2021, Jeff Zucker, may be freely used with an MIT license.
npm package: @solid-rest/file
Description: solid-rest plugin for filesystems
Author: Jeff Zucker
Latest version: 2.1.21

# Solid-Rest-File

**Treat any file system as a serverless Solid pod**

This library treats a local file system as a serverless Solid Pod, accepting Solid requests (GET, PUT, etc.) and returning Solid responses (wac-allow headers, turtle representation of folders, etc.).

The library may be used stand-alone (see [tests](./tests/all.js) for examples), or as a plugin to [Solid-Node-Client](https://github.com/solid/solid-node-client) from where it can be integrated into almost any Solid library or app.  Simply import Solid-Node-Client and thereafter use file:// URLs almost anywhere that https:// URLs work.  See the Solid-Node-Client documentation for details.

&copy; 2021, Jeff Zucker, may be freely used with an MIT license.
npm package: @solid-soda/console
Description: > The Console component eases the creation of beautiful and testable command line interfaces.
Latest version: 1.1.3
Deprecated: Use command-line-args instead

# @solid-soda/console
> The Console component eases the creation of beautiful and testable command line interfaces.

The Console component allows you to create command-line commands. Your console commands can be used for any recurring task, such as cronjobs, imports, or other batch jobs.

## Instalation

`yarn add @solid-soda/console`

## Usage

```ts
const app = new ConsoleApplication(commands)

app.run(process.argv)
```
npm package: @solid-soda/eslint-config
Description: ESLint config for Solid Soda team
Author: Vladimir Golotin
Latest version: 2.1.6
Deprecated: Use @solid-soda/scripts instead

# @solid-soda/eslint-config

This package provides Solid Soda's base JS .eslintrc as an extensible shared config. It's based on Airbnb's [eslint-config-airbnb-base](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base) config.

## Installation

`yarn add --dev @solid-soda/eslint-config eslint`

or

`npm install @solid-soda/eslint-config eslint --save-dev`

## Usage

Add `"extends": "@solid-soda"` to your .eslintrc.

## @solid-soda/eslint-config

Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint`.
npm package: @solid-soda/scripts
Description: [![Scripts sets up by @solid-soda/scripts](https://img.shields.io/static/v1?label=@solid-soda/scripts&color=75ddf4)](https://github.com/solid-soda/scripts)
Author: Igor Kamyshev
Latest version: 2.5.0

# @solid-soda/scripts

[![Scripts sets up by @solid-soda/scripts](https://img.shields.io/static/v1?label=@solid-soda/scripts&color=75ddf4)](https://github.com/solid-soda/scripts)

<img src="https://raw.githubusercontent.com/solid-soda/assets/master/logo.png" align="right"
     alt="Solid Soda logo" width="160" height="160">

Speed up the creation and maintenance of your JS applications. Zero configuration way to use modern code-quality tools.

- **Zero-config.** Any tool is already configured for you.
- **Universal.** Supports TS, React, and can be used with any tech.
- **Uniform.** Config can be shared (all projects have the same configs).

## TL;DR

```sh
npx @solid-soda/scripts
```

## Motivation

1. Before start to code we must set-up ESLint, Stylelint, Prettier, Commitizen, etc. We can to automate all of this. Machines have to suffer.
2. New lint rule adding is a hell. We provide the one source of true for any project. Just run `@solid-soda/scripts` in your project directory.

## Usage

Just run scripts in a directory with your project.

Just run:

```sh
npx @solid-soda/scripts
```

It will generate all configs and put it to repository. Now, you can use any provided tool.

Some scripts will be added to your `package.json`:

- `commit` — runs Commitizen and allow create nice commit messages
- `pretty` — runs Prettier and format all code in the repo
- `lint:code` — runs ESLint and preform static analysis of code

If you have some styles in the repo, we will add extra script:

- `lint:styles` — runs Stylelint and preform static analysis of styles

If you want to release repo by git-tags, we will add ont more script:

- `release` — runs Standard Version, updates CHANGELOG.md, bump version in `package.json` and created git-tag

Also, this library sets up `lint-staged` (prettify all staged files), `Commitlint` (check commit messages by [Conventional Commits specifications](https://www.conventionalcommits.org/en/v1.0.0-beta.2/#specification)) and `simple-git-hooks` (to run Prettier and Commitlint).

## Migration guide

Upgrading from version **1.x.x**, you must do one simple action: just run `@solid-soda/scripts` in your repository.

For example:

```sh
npx @solid-soda/scripts
```

## Acknowledgements

This project based on [mrm](https://github.com/sapegin/mrm) and setup configs for [Commitizen](http://commitizen.github.io/cz-cli/), [Commitlint](https://commitlint.js.org/#/), [ESLint](https://eslint.org), [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks), [lint-staged](https://github.com/okonet/lint-staged), [Prettier](https://prettier.io), [Stylelint](https://stylelint.io).
npm package: @solid-soda/tslint-config
Description: TSLint config for Solid Soda team
Author: Vladimir Golotin
Latest version: 2.5.3
Deprecated: Use @solid-soda/scripts instead

# @solid-soda/tslint-config

This package provides Solid Soda's base JS tslint.js as an extensible shared config.

## Installation

`yarn add --dev @solid-soda/tslint-config tslint`

or

`npm install @solid-soda/tslint-config tslint --save-dev`

## Usage

Add `"extends": "@solid-soda/tslint-config"` to your tslint.js.
npm package: @solid-soda/tsn
Description: [![Scripts sets up by @solid-soda/scripts v2.1.0](https://img.shields.io/static/v1?label=@solid-soda/scripts&message=2.1.0&color=75ddf4)](https://github.com/solid-soda/scripts)
Author: Igor Kamyshev
Latest version: 1.3.3

# tsn

[![Scripts sets up by @solid-soda/scripts v2.1.0](https://img.shields.io/static/v1?label=@solid-soda/scripts&message=2.1.0&color=75ddf4)](https://github.com/solid-soda/scripts)

No-effort way to compile TypeScript with absolute import replacing.

## Usage

```
yarn add -D @solid-soda/tsn
yarn tsn
```

You are fabulous!

## Motivation

Imagine! You want to write TypeScript code, make really great things and use absolute imports. But, Node.js doesn't know about your absolute imports. Just use this task 🌚

## Usage

### Local

You can install it locally:

```
yarn add -D @solid-soda/tsn
yarn tsn
```

or, if you prefer `npm`:

```
npm i --save-dev @solid-soda/tsn
npm run tsn
```

### No-install

And you can use it by `dlx`/`npx`:

```
yarn dlx @solid-soda/tsn
```

or, if you prefer `npm`/`yarn@classic`

```
npx @solid-soda/tsn
```

### Custom config

If you want to pass custom `tsconfig.json` to script, you can easily do it with arguments:

```
yarn tsn tsconfig.custom.json
```

### Runtime usage

If you using `ts-node` and want check code with absolute imports without compilation, you can use `runtime`-helper.

```
ts-node --project tsconfig.json -r @solid-soda/tsn YOUR_CODE.ts
```
npm package: @solid-world/gas-station
Description: Simple package for obtaining current gas fees on several supported networks. (EIP-1559)
Author: Solid World DAO
Latest version: 0.4.0

# solid-world-gas-station
Simple package for obtaining current gas fees on several supported networks. (EIP-1559)

## Usage

```ts
import { initializeGasStation } from '@solid-world/gas-station'

const gasStation = await initializeGasStation(provider)

const { maxFeePerGas, maxPriorityFeePerGas } = await gasStation.getCurrentFees()
```
npm package: @solid.js/solidex
Description: The following is a list of articles, packages and other resources that focus on the SolidJS ecosystem. Solidex is a platform for listing and maintaining these resources is an organized and well-defined manner. This repository acts as a dependency for Soli
Author: Solid Team
Latest version: 1.0.0

<p>
  <img width="100%" src="https://github.com/solidjs/solidex/blob/main/banner.png?raw=true" alt="Solidex">
</p>

# Solidex

The following is a list of articles, packages and other resources that focus on the SolidJS ecosystem. Solidex is a platform for listing and maintaining these resources is an organized and well-defined manner. This repository acts as a dependency for Solid Site and other future Solid-powered projects.

Resources in Solidex have been vetted by a team member, organized and tagged. We consider this a central source of information for our entire community. We accept PRs to add packages to resources and these are supplied upstream to various SolidJS public and private utilities including our future CLI.

## Adding Your Resource

To add to the list of Articles, Podcasts, Videos and Packages, modify the resource files in `resources/` and submit a PR. A team member will review your submission to ensuring tagging and details related to the package meet the Solidex standard.

We maintain these asset in TypeScript to take advantgae of type support. This maintains taconomy, structure and correctness of the data. It also makes it easy to transform the dataset into different formats including Markdown and JSON.

## Scripts

- `yarn build:json`: Generates the index.json file in the root

## Resource List

- `dist/articles.json`: JSON list of article resources.
- `dist/videos.json`: JSON list of video resources.
- `dist/packages.json`: JSON list of packages and utilities.
- `dist/podcasts.json`: JSON list of podcasts.
npm package: @solid/access-control-policy
Description: Implementation of the Access Control Policy specification.
Latest version: 1.0.0

# Access Control Policy

[![Project Solid](https://img.shields.io/badge/Project-Solid-7C4DFF.svg)](https://solidproject.org/)
[![Test Workflow](https://github.com/solid-contrib/access-control-policy/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/solid-contrib/access-control-policy/actions/workflows/ci.yml?query=workflow%3ACI+branch%3Amain)
[![npm package](https://img.shields.io/npm/v/@solid/access-control-policy)](https://www.npmjs.com/package/@solid/access-control-policy)

A TypeScript implementation of the [Access Control Policy (ACP) specification](https://solid.github.io/authorization-panel/acp-specification/).
npm package: @solid/acl-check
Description: Web Access Control check access function
Author: Tim Berners-Lee
Latest version: 0.4.5

# acl-check

[![](https://img.shields.io/badge/project-Solid-7C4DFF.svg?style=flat)](https://github.com/solid/solid)
[![NPM Version](https://img.shields.io/npm/v/acl-check.svg?style=flat)](https://npm.im/acl-check)
[![Build Status](https://travis-ci.org/solid/acl-check.svg?branch=master)](https://travis-ci.org/solid/acl-check)

Javascript library for checking [Web Access
Control](https://github.com/solid/web-access-control-spec) ACLs.

## Usage

```js
const $rdf = require('rdflib')
const aclCheck = require('acl-check')
const ACL = $rdf.Namespace('http://www.w3.org/ns/auth/acl#')

const kb = $rdf.graph()
const fetcher = $rdf.fetcher(kb)

let doc = $rdf.sym('https://alice.example.com/stuff/myVacation.ttl')
let aclDoc = $rdf.sym('https://alice.example.com/stuff/myVacation.ttl.acl')
let directory = $rdf.sym('https://alice.example.com/stuff/')
let dirAclDoc = $rdf.sym('https://alice.example.com/stuff/')

let agent = $rdf.sym('https://alice.example.com/card.ttl#me')
let modesRequired = [ ACL('Read'), ACL('Write'), ACL('Control') ]

await fetcher.load(aclDoc) // Load the ACL documents into kb

let allow = aclCheck.checkAccess(kb, resource, null, aclDoc, agent, modesRequired, origin, trustedOrigins)

// When there is no direct ACL file, find the closest container ACL file in the tree above then...
await fetcher.load(dirAclDoc) // Load the directory ACL documents into kb
let allow = aclCheck.checkAccess(kb, resource, directory, dirAclDoc, agent, modesRequired, origin, trustedOrigins)

console.log('Access allowed? ' + allow)
// OWTTE
```
npm package: @solid/cli
Description: A utility to facilitate command-line interaction with Solid servers
Author: Ruben Verborgh
Latest version: 0.2.1

# Solid CLI
A utility to facilitate command-line interaction with Solid servers.

⚠️ **Do _not_ depend on this library yet.**
It currently is a hard-coded integration with node-solid-server,
meant for experimentation.
It is not guaranteed to work, and certainly not with arbitrary Solid servers.

We are currently lacking server-side implementations
of the necessary parts of OIDC for non-browser apps.
Solid CLI uses a hack to still enable this,
but it is _not_ a recommended way of working.

In the future, Solid servers and Solid CLI
should use a standardized protocol instead.

## Installation
```
npm install -g @solid/cli
```

## Usage
```
IDP=https://drive.verborgh.org
USERNAME=ruben
PASSWORD=ruben
URL=https://drive.verborgh.org/inbox/

curl "$URL" -H 'Authorization: Bearer '`solid-bearer-token "$IDP" "$USERNAME" "$PASSWORD" "$URL"`
```

## License
©2018–present [Ruben Verborgh](https://ruben.verborgh.org/),
[MIT License](https://github.com/solid/solid-cli/blob/master/LICENSE.md).
npm package: @solid/community-server-metadata-extender
Description: [![MIT license](https://img.shields.io/npm/l/@solid/community-server-metadata-extender)](https://github.com/RubenVerborgh/solid-metadata-extender) [![npm version](https://img.shields.io/npm/v/@solid/community-server-metadata-extender)](https://www.npmjs.c
Author: Ruben Verborgh
Latest version: 3.0.0

# Experimental metadata module<br> for the Community Solid Server
[![MIT license](https://img.shields.io/npm/l/@solid/community-server-metadata-extender)](https://github.com/RubenVerborgh/solid-metadata-extender)
[![npm version](https://img.shields.io/npm/v/@solid/community-server-metadata-extender)](https://www.npmjs.com/package/@solid/community-server-metadata-extender)

This module adds extra metadata to documents in containers.

## Usage
```shell
git clone https://github.com/RubenVerborgh/solid-metadata-extender.git
cd solid-metadata-extender
npm ci
npm run start
```

## License
[MIT License](https://github.com/RubenVerborgh/philips-hue/blob/master/LICENSE.md)
npm package: @solid/context
Description: A handy JSON-LD context for Solid apps and libraries
Author: Ruben Verborgh
Latest version: 1.1.0

# A handy JSON-LD context for Solid
This module contains a [JSON-LD context](https://www.w3.org/TR/json-ld/#the-context)
for use with [Solid](https://solid.mit.edu/) apps and libraries.

[![npm version](https://img.shields.io/npm/v/@solid/context.svg)](https://www.npmjs.com/package/@solid/context)

This is _not_ “the” Solid context (there is no such thing),
but rather a useful one for your projects.
<br>
For example, [LDflex for Solid](https://github.com/solid/query-ldflex/)
relies on this module.

## Usage
You can `require` the context:
```javascript
const context = require('@solid/context');
```

Or `import` it:
```javascript
import context from '@solid/context';
```

Or refer to the file:
```javascript
const context = require('@solid/context/context.json');
```

## Installation
```bash
npm install @solid/context
```

## License
©2018–present [Ruben Verborgh](https://ruben.verborgh.org/),
[MIT License](https://github.com/solid/context/blob/master/LICENSE.md).
npm package: @solid/eslint-config-base
Description: Solid defaults for eslinting.
Latest version: 0.6.0

# Solid ESLint base configuration
[![npm](https://img.shields.io/npm/v/@solid/eslint-config-base)](https://www.npmjs.com/package/@solid/eslint-config-base)

Solid defaults for eslinting.

## Install

1. Install package and its peer-dependencies
   ```bash
   npm install --save-dev @solid/eslint-config-base
   npx install-peerdeps -D @solid/eslint-config-base
   ```
2. Extend `@solid/eslint-config-base` from `.eslintrc.js`
   ```bash
   printf 'module.exports = {\n  extends: [ "@solid/eslint-config-base" ]\n};\n' > .eslintrc.js
   ```


## Linting TypeScript

### Requirements

TypeScript configuration files need to match the `./**/tsconfig.*json` glob pattern adopted
by Solid's ESLint base configuration.

All TypeScript files must be included in a `tsconfig`.

### A common error

A common error is missing a `tsconfig` for tests.
```bash
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: <TEST_FILE>
The file must be included in at least one of the projects provided.
```

To fix it, extend `tsconfig.json` from a `tsconfig.test.json` that includes the `test` folder.
```bash
printf '{\n  "extends": "./tsconfig.json",\n  "include": [ "test" ]\n}\n' > tsconfig.test.json
```
npm package: @solid/jose
Description: JSON Object Signing and Encryption
Latest version: 0.7.0

# JSON Object Signing and Encryption (JOSE) _(@solid/jose)_

> Lightweight isomorphic JSON Object Signing and Encryption (JOSE) library for browser and Node.js

## Table of Contents

- [Security](#security)
- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [License](#license)

## Security

TBD

## Background

- Based on Webcrypto API
- Isomorphic (Node.js and Browser)

## Install

Requires Node.js 8+.

```
npm install @solid/jose
```

## Usage

### Building with Webpack

**Important:**
If you're using this library as a dependency and you plan to use Webpack, don't
forget to add the following lines to your `webpack.config.js` `externals:` 
section:

```js
  externals: {
    '@sinonjs/text-encoding': 'TextEncoder',
    'isomorphic-webcrypto': 'crypto'
  }
```

### In Node

```js
const { JWT } = require('@solid/jose')

const decoded = JWT.decode(data) // throws an error if invalid
```

### In Browser

If you `npm install @solid/jose` as a dependency, the Webpack'd minified bundle will be
available in the `dist/` directory as `jose.min.js`.

If you're actively developing/testing this lib, you can `npm run dist`, and the
bundle will be rebuilt.

To use in the browser, simply import the bundle in a `<script>` tag, and the lib
will be loaded into the `window.JOSE` global variable.

Example `test.html` file, to illustrate:

```html
<html>
<head>
  <script src="dist/jose.min.js"></script>
  <script>
    // You can now start using the library
    let jwt = new JOSE.JWT({
      header: { alg: 'HS256' },
      payload: { iss: 'https://forge.anvil.io' }
    })
  </script>
</head>
<body>
Sample usage of JOSE lib in a browser.
</body>
</html>
```

## Testing

### Nodejs

```bash
$ npm test
```

## License

[The MIT License](LICENSE.md)

Copyright (c) 2016 Anvil Research, Inc.
Copyright (c) 2017-2019 The Solid Project
npm package: @solid/keychain
Description: KeyChain for use with Web Cryptography API in Node.js
Latest version: 0.4.0

# KeyChain for use with Web Cryptography API in Node.js

## Usage

Install the package

```bash
$ npm install https://github.com/anvilresearch/keychain.git
```

Load the module

```javascript
const KeyChain = require('keychain')
```

Create a new instance by passing a descriptive object to the `KeyChain` 
constructor. This object can have any naming or nesting scheme, as long as the last nested object contains parameters describing key generation. At a bare minimum, this must include an `alg` property with a JWA algorithm name as its value. Currently, `RS256`, `RS384`, and `RS512` are supported. 

```javascript
let keys = new KeyChain({
  a: { b: { alg: 'RS256' } },
  c: { d: { alg: 'RS256' } },
  e: { f: { alg: 'RS256', modulusLength: 2048 } // default is 4096
}) 
```

This initialized a KeyChain instance but didn't generate keys. To generate keys 
according to the object passed to the keychain, call `rotate()`. The `rotate()` 
method returns a promise for the keychain.

```javascript
keys.rotate()
```

Once keys have been generated, they can be accessed as CryptoKey or JWK objects, 
according to the object structure defined by the caller.

Access CryptoKey objects for Web Crypto API operations:

```javascript
keys.a.b.privateKey
keys.a.b.publicKey
```

Access JWK objects:

```javascript
keys.a.b.privateJwk
keys.a.b.publicJwk
```

Key rotation also generates a JWK Set in object and JSON form:

```javascript
keys.jwks     // JWK Set object
keys.jwkSet   // JWK Set JSON string
```

## Running tests

### Nodejs

```bash
$ npm test
```

## MIT License

[The MIT License](LICENSE.md)

Copyright (c) 2016 Anvil Research, Inc.
Copyright (c) 2017-2019 The Solid Project
npm package: @solid/lit-vocab-common-rdfext
Description: Bundle of vocabularies that includes the following:

  schema-inrupt-ext: Extension to Schema.org terms providing multilingual alternative names and translations for comments (e.g. for use directly as labels or tool-tips in user interfaces or error messag
Author: @inrupt/lit-artifact-generator
Latest version: 0.4.9

ERROR: No README data found!
npm package: @solid/lit-vocab-common-rdfjs
Description: Bundle of vocabularies that includes the following:

  schema-inrupt-ext: Extension to Schema.org terms providing multilingual alternative names and translations for comments (e.g. for use directly as labels or tool-tips in user interfaces or error messag
Author: @inrupt/lit-artifact-generator
Latest version: 0.4.14

ERROR: No README data found!
npm package: @solid/lit-vocab-lit
Description: Bundle of vocabularies that includes the following:

  lit_core: The LIT Core Ontology. The LIT is intended to be a collection of utility libraries to ease the
 adoption of RDF for developers.

  lit_consent: Consent vocabulary defining LIT-specific terms
Author: @inrupt/lit-artifact-generator
Latest version: 0.4.14

ERROR: No README data found!