open-index/open-npm huggingface dataset:
npm package: @jonathanusername/promise-mock
Description: Promise mock library for synchronous Promise testing
Author: Taylor Hakes
Latest version: 2.0.2

promise-mock [![Build Status](https://travis-ci.org/taylorhakes/promise-mock.svg)](https://travis-ci.org/taylorhakes/promise-mock)
=============
Promise mocking library to make Promises resolve synchronously

## Why
- Tests are faster
- Don't need `done()` function
- Stack traces are preserved / Easier debugging
- Can be easier to write tests (depends)

### Don't Promises need to be async or else my code will break?
**Nope**

### Use with Node and Webpack/Browserify
```
npm install promise-mock
```

### Simple use with Mocha or Jasmine
Get the result of a Promise `PromiseMock.getResult`
```js
import PromiseMock from 'promise-mock';

describe('testing', function() {
    beforeEach(function() {
        PromiseMock.install()
    });
    afterEach(function() {
        PromiseMock.uninstall();
    });
    it('Sync Promise test', function() {
        var result = PromiseMock.getResult(Promise.resolve('hello')));
        expect(result).toBe('hello');
    });
    
});
```

Handle errors synchronously
```js
import PromiseMock from 'promise-mock';

describe('testing', function() {
    beforeEach(function() {
        PromiseMock.install()
    });
    afterEach(function() {
        PromiseMock.uninstall();
    });
    it('Sync Promise test', function() {
        expect(function() {
            PromiseMock.getResult(Promise.reject(new Error('An error')));
        }).toThrow(new Error('An Error'));
    });
});
```

Execute a single async callback
```js
import PromiseMock from 'promise-mock';

describe('testing', function() {
    beforeEach(function() {
        PromiseMock.install()
    });
    afterEach(function() {
        PromiseMock.uninstall();
    });
    it('Sync Promise test', function() {
        var result;
        Promise.resolve('hello').then(function(data) {
            result = data;
        });
        Promise.run();
        expect(result).toBe('hello');
    });
    
});
```
Resolve all pending Promises
```js
import PromiseMock from 'promise-mock';

describe('testing', function() {
    beforeEach(function() {
        PromiseMock.install()
    });
    afterEach(function() {
        PromiseMock.uninstall();
    });
    it('Sync Promise test', function() {
        var result1, result2, result3;
        Promise.resolve('hello1').then(function(data) {
            result1 = data;
            return 'hello2';
        }).then(function(data) {
            result2 = data;
            return 'hello3';
        }).then(function(data) {
            result3 = data;
        });;
        Promise.runAll();
        expect(result1).toBe('hello1');
        expect(result2).toBe('hello2');
        expect(result3).toBe('hello3');
    });
    
});
```

### For commonjs/require webpack and rollup
Since the move to ES6 modules. You need to add `.default`
```js
const PromiseMock = require('promise-mock').default;

```

### Testing
```
npm install
npm test
```

### License
MIT
npm package: @jonathanyan/fabjs
Description: The FAB JavaScript library for Smart Contract development.
Latest version: 1.7.2

The FAB JavaScript library for Smart Contract development.

See [documentation](https://fabproject.github.io/fabjs-doc/).

See [companion tutorial](https://github.com/fabproject/fabbook/blob/master/part2/erc20-js.md).

# Install

```
npm install fabjs
```

This is a sample code snippet that transfer ERC20 tokens:

```js
import {
  FabRPC,
} from "fabjs"

const repoData = require("./solar.json")
const fab = new Fab("http://fab:test@localhost:3889", repoData)

const myToken = fab.contract("zeppelin-solidity/contracts/token/CappedToken.sol")

async function transfer(fromAddr, toAddr, amount) {
  const tx = await myToken.send("transfer", [toAddr, amount], {
    senderAddress: fromAddr,
  })

  console.log("transfer tx:", tx.txid)
  console.log(tx)

  await tx.confirm(3)
  console.log("transfer confirmed")
}
```

The [full source code](https://github.com/fabproject/fabbook-mytoken-fabjs-cli).

> This example uses async/await (supported natively by Node 8+).

# Running Tests

```
docker run -it --rm \
  --name fabjs \
  -v `pwd`:/dapp \
  -p 5889:3889 \
  hayeah/fabportal
```

Enter into container:

```
docker exec -it fabjs sh
```

Generate initial blocks:

```
qcli generate 600

qcli getbalance

2000000.00000000
```

Deploy test contracts:

```
sh deploy-test-contracts.sh
```

Build and run tests:

```
npm build
npm run test
```
npm package: @jonathas_rodrigues/design-system
Description: Jonathas Rodrigues design system
Author: Jonathas Rodrigues
Latest version: 0.0.13

# JonathasRodrigues Design System

<img src="src/design-system.png" width="100%" />

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

## Tech stack
Building components
- 📚 [Storybook](https://Storybook.js.org) for UI component development and [auto-generated docs](https://medium.com/Storybookjs/Storybook-docs-sneak-peak-5be78445094a)
- 💅 [Styled-components](https://www.styled-components.com/) for component-scoped styling
- ⚛️ [React](https://reactjs.org/) declarative component-centric UI

Maintaining the system
- 📦 [NPM](https://www.npmjs.com/) for [packaging and distribution](https://blog.hichroma.com/how-packaging-makes-it-dead-simple-to-share-ui-components-29912593539d)
- ✅ [Chromatic](https://www.chromatic.com/) to prevent UI bugs in components (by JonathasRodrigues maintainers)
- 🚥 [CircleCI](https://circleci.com/) Continuous integration
npm package: @jonawe/steamapi
Description: This is a wrapper for the steam api written in typescript. The project is based on [steam-api-ts](https://github.com/JarivdKaap/steam-api-ts) and [node-steamapi](https://github.com/xDimGG/node-steamapi).
Author: Jona Wessendorf
Latest version: 0.2.0

# steam-api-wrapper-ts

This is a wrapper for the steam api written in typescript.
The project is based on [steam-api-ts](https://github.com/JarivdKaap/steam-api-ts) and [node-steamapi](https://github.com/xDimGG/node-steamapi).

**This library is still in very early development so I would not advice using it.**
npm package: @jonbell/tiled-map-type-guard
Description: Typescript package boilerplate template
Author: Abhishek
Latest version: 2.0.6

# Tiled map type guards

![Github Actions](https://github.com/workadventure/tiled-map-type-guard/workflows/Release/badge.svg) [![codecov](https://codecov.io/gh/workadventure/tiled-map-type-guard/branch/main/graph/badge.svg?token=UCCA6D6JCB)](https://codecov.io/gh/workadventure/tiled-map-type-guard)

When working with [Tiled](https://www.mapeditor.org/) maps, it can be useful to have property defined types in Typescript.

This package contains a set of interfaces that map the [Tiled map JSON format](https://doc.mapeditor.org/en/stable/reference/json-map-format/).

Moreover, this package comes with [Zod type guards](https://github.com/colinhacks/zod) that will allow
you to actually **check** that the JSON file ou are reading is actually a well-formed Tiled map.

Available interfaces:

- `ITiledMap`
- `ITiledMapLayer`
  - `ITiledMapGroupLayer`
  - `ITiledMapImageLayer`
  - `ITiledMapObjectLayer`
    - `ITiledMapObject`
      - `ITiledMapText`
      - `ITiledMapPoint`
  - `ITiledMapTileLayer`
- `ITiledMapTileset`
  - `ITiledMapTile`
    - `ITiledMapWangColor`
    - `ITiledMapWangSet`
    - `ITiledMapWangTile`
- `ITiledMapChunk`
- `ITiledMapFrame`
- `ITiledMapGrid`
- `ITiledMapOffset`
- `ITiledMapProperty`
- `ITiledMapTerrain`
- `ITiledMapTransformations`

Usage:

```ts
// This will throw an error if "data" is not matching the type ITiledMap
const map: ITiledMap = ITiledMap.parse(data);
```
npm package: @jonbrennecke/farrago
Description: farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things
Author: jpbrennecke@gmail.com
Latest version: 1.0.9


# @jonbrennecke/farrago

farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things

Farrago is a reusable template for react-native modules. It comes with a few basic things installed like eslint, prettier, flow and jest.

## Getting started

`$ npm install @jonbrennecke/farrago --save`

### Mostly automatic installation

`$ react-native link @jonbrennecke/farrago`

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `r@jonbrennecke-farrago` and add `RNJonbrenneckeFarrago.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNJonbrenneckeFarrago.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android - coming soon

## Usage
```javascript
import Farrago from '@jonbrennecke/farrago';
```
npm package: @jonbrennecke/react-native-animated-ui
Description: farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things
Author: jpbrennecke@gmail.com
Latest version: 1.0.11


# @jonbrennecke/farrago

farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things

Farrago is a reusable template for react-native modules. It comes with a few basic things installed like eslint, prettier, flow and jest.

## Getting started

`$ npm install @jonbrennecke/farrago --save`

### Mostly automatic installation

`$ react-native link @jonbrennecke/farrago`

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `r@jonbrennecke-farrago` and add `RNJonbrenneckeFarrago.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNJonbrenneckeFarrago.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android - coming soon

## Usage
```javascript
import Farrago from '@jonbrennecke/farrago';
```
npm package: @jonbrennecke/react-native-camera
Description: farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things
Author: jpbrennecke@gmail.com
Latest version: 1.0.78-alpha.8


# @jonbrennecke/farrago

farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things

Farrago is a reusable template for react-native modules. It comes with a few basic things installed like eslint, prettier, flow and jest.

## Getting started

`$ npm install @jonbrennecke/farrago --save`

### Mostly automatic installation

`$ react-native link @jonbrennecke/farrago`

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `r@jonbrennecke-farrago` and add `RNJonbrenneckeFarrago.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNJonbrenneckeFarrago.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android - coming soon

## Usage
```javascript
import Farrago from '@jonbrennecke/farrago';
```
npm package: @jonbrennecke/react-native-media
Description: farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things
Author: jpbrennecke@gmail.com
Latest version: 1.0.43-alpha.1


# @jonbrennecke/farrago

farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things

Farrago is a reusable template for react-native modules. It comes with a few basic things installed like eslint, prettier, flow and jest.

## Getting started

`$ npm install @jonbrennecke/farrago --save`

### Mostly automatic installation

`$ react-native link @jonbrennecke/farrago`

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `r@jonbrennecke-farrago` and add `RNJonbrenneckeFarrago.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNJonbrenneckeFarrago.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android - coming soon

## Usage
```javascript
import Farrago from '@jonbrennecke/farrago';
```
npm package: @jonbrennecke/react-native-speech
Description: farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things
Author: jpbrennecke@gmail.com
Latest version: 1.0.5


# @jonbrennecke/farrago

farrago \ fə-ˈrä-(ˌ)gō , -ˈrā- \ noun, a motley assortment of things

Farrago is a reusable template for react-native modules. It comes with a few basic things installed like eslint, prettier, flow and jest.

## Getting started

`$ npm install @jonbrennecke/farrago --save`

### Mostly automatic installation

`$ react-native link @jonbrennecke/farrago`

### Manual installation

#### iOS

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `r@jonbrennecke-farrago` and add `RNJonbrenneckeFarrago.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNJonbrenneckeFarrago.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<

#### Android - coming soon

## Usage
```javascript
import Farrago from '@jonbrennecke/farrago';
```
npm package: @jonbru/xchain-ethereum
Description: Ethereum client for XChainJS
Author: XChainJS
Latest version: 0.27.6

# `@xchainjs/xchain-ethereum`

## Modules

- `client` - Custom client for communicating with Ethereum by using [`ethers`](https://github.com/ethers-io/ethers.js)

## Installation

```
yarn add @xchainjs/xchain-ethereum
```

Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-ethereum`.

```
yarn add @xchainjs/xchain-client @xchainjs/xchain-crypto @xchainjs/xchain-util axios ethers
```

## Documentation

### [`xchain ethereum`](http://docs.xchainjs.org/xchain-client/xchain-ethereum/)

[`How xchain-ethereum works`](http://docs.xchainjs.org/xchain-client/xchain-ethereum/how-it-works.html)\
[`How to use xchain-ethereum`](http://docs.xchainjs.org/xchain-client/xchain-ethereum/how-to-use.html)

## Service Providers

This package uses the following service providers:

| Function                  | Service   | Notes                                                                          |
| ------------------------- | --------- | ------------------------------------------------------------------------------ |
| ETH balances              | Etherscan | https://etherscan.io/apis#accounts (module=`account`, action=`balance`)        |
| Token balances            | Etherscan | https://etherscan.io/apis#tokens (module=`account`, action=`tokenbalance`)     |
| ETH transaction history   | Etherscan | https://etherscan.io/apis#accounts (module=`account`, action=`txlistinternal`) |
| Token transaction history | Etherscan | https://etherscan.io/apis#accounts (module=`account`, action=`tokentx`)        |
| Transaction fees          | Etherscan | https://etherscan.io/apis#gastracker (module=`gastracker`, action=`gasoracle`) |
| Transaction broadcast     | Etherscan | https://sebs.github.io/etherscan-api/#eth_sendrawtransaction                   |
| Explorer                  | Etherscan | https://etherscan.io/                                                          |

Etherscan API rate limits: https://info.etherscan.com/api-return-errors/

- This package uses `etherjs` library, by default it uses several providers. (`https://docs.ethers.io/v5/api-keys/`)
npm package: @jonbru/xchain-thorchain-amm
Description: module that exposes estimating & swappping cryptocurrency assets on thorchain
Author: THORChain
Latest version: 0.3.13

# `@xchainjs/xchain-thorchain-amm`

## Modules

Thorchain AMM module

## Installation

```
yarn add @xchainjs/xchain-thorchain-amm
```

Following peer dependencies have to be installed into your project. These are not included in `@xchainjs/xchain-thorchain-amm`.

```bash
  "dependencies": {
   "@binance-chain/javascript-sdk": "^4.2.0",
    "@cosmos-client/core": "0.46.1",
    "@psf/bitcoincashjs-lib": "^4.0.2",
    "@xchainjs/xchain-binance": "^5.6.6",
    "@xchainjs/xchain-bitcoin": "^0.20.7",
    "@xchainjs/xchain-bitcoincash": "^0.15.6",
    "@xchainjs/xchain-client": "^0.13.5",
    "@xchainjs/xchain-cosmos": "^0.20.6",
    "@xchainjs/xchain-crypto": "^0.2.6",
    "@xchainjs/xchain-doge": "^0.5.6",
    "@jonbru/xchain-ethereum": "^0.27.6",
    "@xchainjs/xchain-evm": "^0.1.3",
    "@xchainjs/xchain-avax": "^0.1.3",
    "@xchainjs/xchain-litecoin": "^0.10.8",
    "@xchainjs/xchain-midgard": "0.4.1",
    "@xchainjs/xchain-thorchain": "^0.27.7",
    "@xchainjs/xchain-thorchain-query": "^0.1.12",
    "@xchainjs/xchain-thornode": "^0.1.5",
    "@xchainjs/xchain-util": "^0.12.0",
    "axios": "^0.25.0",
    "axios-retry": "^3.2.5",
    "bchaddrjs": "^0.5.2",
    "bech32": "^2.0.0",
    "bech32-buffer": "^0.2.0",
    "bignumber.js": "^9.0.0",
    "bitcoinjs-lib": "^5.2.0",
    "coininfo": "^5.1.0",
    "coinselect": "^3.1.12",
    "ethers": "^5.6.6",
    "wif": "^2.0.6"
  }

```

## For live examples

Do Swap: https://replit.com/@thorchain/doSwap-Single \
Add Liquidity: https://replit.com/@thorchain/addLiquidity \
Withdraw liquidity: https://replit.com/@thorchain/removeLiquidity \
Add Savers & withdraw Savers: https://replit.com/@thorchain/saversTs#index.ts

## Documentation

[xchain-thorchain-amm](http://docs.xchainjs.org/xchain-thorchain-amm/) \
[How thorchain-amm works](http://docs.xchainjs.org/xchain-thorchain-amm/how-it-works.html)\
[How to use thorchain-amm](http://docs.xchainjs.org/xchain-thorchain-amm/how-to-use.html)

## Compiler options

tsconfig compiler options

```ts
{
    "compilerOptions": {
        "module":"commonjs",
        "target": "es5",
        "noEmitOnError": true,
        "resolveJsonModule": true,
        "esModuleInterop": true,
        "lib": ["es6", "dom", "es2016", "es2017"]
    }
}
```

### Setting Headers for Nine Realms endpoints

If you plan on using the publically accessible endpoints provided by Nine Realms(listed below), ensure that you add a valid 'x-client-id' to all requests

- https://midgard.ninerealms.com
- https://haskoin.ninerealms.com (BTC/BCH/LTC)
- https://thornode.ninerealms.com

Example

```typescript
import cosmosclient from '@cosmos-client/core'
import axios from 'axios'
import { register9Rheader } from '@xchainjs/xchain-util'

register9Rheader(axios)
register9Rheader(cosmosclient.config.globalAxios)
```

For a complete example please see this [test](https://github.com/xchainjs/xchainjs-lib/blob/master/packages/xchain-thorchain-amm/__e2e__/wallet.e2e.ts)
npm package: @joncarlson/prettier-config
Description: Prettier config
Author: Jon Carlson
Latest version: 1.0.0

# @joncarlson/prettier-config

## Usage

**Install**:

```bash
npm install --save-dev --save-exact prettier
npm install --save-dev @joncarlson/prettier-config
```

**Edit `package.json`**:

```jsonc
{
  // ...
  "prettier": "@joncarlson/prettier-config"
}
```
npm package: @joncasey/google-fonts
Description: Download Google fonts for local/offline delivery
Author: Jon Casey
Latest version: 0.5.1

# google-fonts

Download fonts for local/offline delivery.

## Install
```
npm i @joncasey/google-fonts
```

## Example

```javascript
const { getFont, downloadFont } = require('@joncasey/google-fonts')

getFont('Open Sans')
.then(font => downloadFont(font, 'Open Sans'))
.then(results => console.log(results))
.catch(error => console.log(`Error`, error))
```

## Advanced Usage!

You can just copy the dist files locally.
They have ZERO-dependencies (other than NodeJS)

copy https://unpkg.com/@joncasey/google-fonts/dist/google-fonts.mjs
Then just
````
import { getFont, downloadFont } from './google-fonts.mjs'
````
or, using require..

copy https://unpkg.com/@joncasey/google-fonts/dist/google-fonts.js

````
const { getFont, downloadFont } = require('./google-fonts.js')
````

## API

```javascript
let fontObject = await getFont (fontFamily)

/*
  fontObject = {
    css: "",
    fonts: [
      {
        src: {
          local: "",
          woff: "",
          woff2: ""
        },
        family: "",
        style: "",
        weight: ""
      }
    ],
    raw: []
  }
*/
```
npm package: @jonce/emdc-bridge
Description: EmdcBridge JS wrapper for Web-Android communication
Latest version: 0.1.10

# EmdcBridge

A lightweight JSBridge wrapper for Web-to-Android communication.

## Install

```bash
npm i @jonce/emdc-bridge
```

## Usage

```ts
import bridge from "@jonce/emdc-bridge";

// Set item
bridge.setItem("profile", { name: "Alice" });

// Get item by key
const info = bridge.getItem("profile");

// Clear item by key
bridge.clearItem("profile");

// Start assistant work
bridge.startAssistantWork();

// Play video
bridge.playVideo("intro.mp4");

// Device info
const device = bridge.getDeviceInfo();

// Listen to Android events
bridge.on("event", (data) => {
  console.log("event", data);
});

// Android pushes:
// window.EmdcBridgeWeb.callback({ type: "event", data: { ... } })
```

## Advanced: request/response (optional)

```ts
bridge.request("getItem", { type: "getItem", data: { key: "profile" } })
  .then((data) => console.log(data))
  .catch(console.error);
```

## API

- `bridge.setItem(key, data)`
- `bridge.getItem(key)`
- `bridge.clearItem(key)`
- `bridge.startAssistantWork()`
- `bridge.playVideo(fileName)`
- `bridge.getDeviceInfo()`
- `bridge.isAndroidAvailable()`
- `bridge.request(methodName, payload, { timeout })`
- `bridge.on(type, handler)`
- `bridge.once(type, handler)`
- `bridge.off(type, handler)`

## Payload format

```json
{
  "key": "string",
  "data": {}
}
```

## Notes

- Payloads are JSON-stringified before sending to Android by default. If your Android bridge expects raw objects, create your own instance with `serialize: false`.

## Environment Check

Use `bridge.isAndroidAvailable()` to check whether the Android bridge has been injected before calling Android methods.

```ts
import { EmdcBridgeCore } from "@jonce/emdc-bridge";

const bridge = new EmdcBridgeCore({ serialize: false });
```
npm package: @jonchurch/claude-code-gh
Description: Auto-install GitHub CLI (gh) for Claude Code web/remote sessions
Author: Jon Church
Latest version: 1.1.1

# claude-code-gh

Claude Code web sessions run on ephemeral VMs without the GitHub CLI (`gh`). If you're used to having Claude work with `gh` locally, you won't be able to in web sessions.

This package fixes that by installing `gh` automatically [when your session starts](https://code.claude.com/docs/en/hooks#sessionstart).

> [!NOTE]
> Hopefully Anthropic will add the `gh` cli as installed software on their default iamges, then this package will not be necessary and can be archived.

## Setup

Remote sessions only see repo-level settings. Add to `.claude/settings.json` in your repo:

```json
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "startup",
        "hooks": [
          {
            "type": "command",
            "command": "npx @jonchurch/claude-code-gh"
          }
        ]
      }
    ]
  }
}
```

Commit and `gh` will be available in your next web session.

### Local Install (Alternative)

Running `npx` on every session start means executing code from npm that you don't control. If you'd rather call a script under your own version control:

```bash
npx @jonchurch/claude-code-gh install
```

This copies the script to `.claude/hooks/` and updates your settings to use it. Commit both and you're set.

## Environment / Network Settings

Requires **"Full"** [network access](https://code.claude.com/docs/en/claude-code-on-the-web), or **"Custom"** with `release-assets.githubusercontent.com` allowed. ("Limited" won't work - GitHub downloads redirect to that domain.)

## Authentication

For private repos or higher rate limits, add `GH_TOKEN` to your environment variables.

## License

MIT
npm package: @joncottrell/eleventy-fa-icons
Description: Camp Jefferson Eleventy FontAwesome Icons
Author: Jonathan Cottrell
Latest version: 0.1.6

# Eleventy FontAwesome Icon

A configurable Eleventy shortcode that outputs FontAwesome icon svgs in a custom svg sprite. Forked from @campj/eleventy-fa-icons

## Usage

### Installation

`yarn install --dev @joncottrell/eleventy-fa-icons`

### Adding to Eleventy

in .eleventy.js:

```js
// require
const { FontAwesomeIcon } = require("@joncottrell/eleventy-fa-icons");
module.exports = function(config) {
  // Shortcode
  config.addNunjucksShortcode("FontAwesomeIcon", FontAwesomeIcon());
  //
};
```

Optionally you can pass the ouputDir into `FontAwesomeIcon` if you aren't using the default `_site`. E.g:

```js
// require
const { FontAwesomeIcon } = require("@joncottrell/eleventy-fa-icons");
module.exports = function(config) {
  // Shortcode
  config.addNunjucksShortcode("FontAwesomeIcon", FontAwesomeIcon("dist"));
  //
};
```

Note: If you have any idea on how to set the output directory more cleanly, I'm all ears, feel free to send a PR or give me a suggestion.

### In any nunjucks template file:

#### Use the shortcode:

```
{% FontAwesomeIcon
    name = "times",
    type = "solid",
    class = "someClassName",
%}
```

#### Props:

- **name:** the icon name
- **type:** the icon type (one of "solid", "regular" or "brand") -- defaults to **solid**
- **class:** additional classes to append to the icon wrapper
- **tag:** the type of html tag you'd like to use to output the icon

\*\* other properties will get applied to the wrapper tag as attributes

### CSS

Default styles for an icon can be imported from `@joncottrell/eleventy-fa-icons/icon.css`;
I recommend you use your own:

```css
.icon svg {
  display: block;
  width: 1em;
  height: 1em;
}
```

## Utility Methods

### _getAvailableIcons(type)_

#### Props:

- **type:** the icon type (one of "solid", "regular" or "brand")

#### Usage

```js
const { getAvailableIcons } = require("@campj/eleventy-fa-icons");

getAvailableIcons("solid"); // outputs a list of icon names for the 'solid' type
getAvailableIcons("regular"); // outputs a list of icon names for the 'regular' type
getAvailableIcons("brand"); // outputs a list of icon names for the 'brand' type
```

### _isIconAvailable(name, type)_

#### Props:

- **name:** the icon name
- **type:** the icon type (one of "solid", "regular" or "brand")

#### Usage

```js
const { isIconAvailable } = require("@joncottrell/eleventy-fa-icons");
// checks whether the icon "times" is available in the "regular" type
isIconAvailable("times", "regular");
```

would output the following to the console:

```
FontAwesomeIcon:: no, the icon 'times' is not available in type regular, but it is available in the type solid.
```
npm package: @jondavis23/deep-context
Description: CLI-first AI coding assistant with persistent memory - your AI learns from corrections and remembers project decisions
Latest version: 0.1.1

# Deep Context

Your AI keeps forgetting what you told it. Deep Context fixes that.

## The problem

Monday: "Use tabs, not spaces"
Tuesday: "I said tabs!"
Wednesday: "WHY ARE THERE SPACES"

Sound familiar? Every new chat starts from zero. Your AI has no memory.

## What this does

Deep Context gives AI tools memory. You tell it something once, it remembers forever.

## Install

```
npm install -g @jondavis23/deep-context
```

## Setup

```
cd your-project
dc init
dc install
```

`dc init` detects your stack and sets up rules. `dc install` connects it to your AI tools (Claude Code, Cursor, Claude Desktop).

After that, your rules and preferences are automatically included in every AI conversation for that project.

You can add your own rules too:

```
dc add rule "Always use async/await, never callbacks"
dc add rule "All IDs must be UUIDs"
dc add choice "PostgreSQL" --why "Need complex queries"
```

## How it works

Each project gets a `.dc` folder with:
- Your rules (things the AI should always do)
- Your choices (decisions you made and why)
- Memories (things the AI learned while working with you)

When an AI tool asks for context, Deep Context gives it the relevant stuff. The AI writes better code because it knows your preferences.

## Commands

```
dc init              # set up a project
dc install           # connect to Claude Code, Cursor, etc.
dc status            # see what's connected
dc add rule "..."    # add a rule
dc add choice "..."  # record a decision
dc disable           # turn off for this project
dc enable            # turn back on
dc remove            # delete everything
```

## Does it actually work?

We ran a benchmark with 10 coding tasks. Without Deep Context, Claude followed project conventions 33% of the time. With Deep Context, 91%.

That's the difference between "use UUIDs" being ignored vs being followed.

## Privacy

Everything stays on your machine in the `.dc` folder. Nothing is sent anywhere unless you're using a cloud AI (and even then, only the context goes to the AI you chose).

## Requirements

- Node 20+
- For the MCP server: Claude Code, Cursor, or Claude Desktop

## Questions

**Do I need to configure anything?**
Run `dc init` then `dc install`. It auto-detects your project type and connects to your AI tools.

**What if I have 50 projects?**
Each project has its own `.dc` folder. No bleeding between projects.

**Can I turn it off for a project?**
`dc disable` creates a `.dcignore` file. The AI tools will skip that project.

**Is it free?**
Yes. MIT license.

---

MIT License
npm package: @jondcallahan/react-headroom
Description: Hide your header until you need it. React.js port of headroom.js
Author: Jon Callahan
Latest version: 2.1.9

# react-headroom
Hide your header until you need it.

## Demo
http://kyleamathews.github.io/react-headroom

## Install
`npm install react-headroom`

## Usage
A simple example, [see the docs site](http://kyleamathews.github.io/react-headroom/)
for more examples and documentation.

```html
<Headroom>
  <h1>You can put anything you'd like inside the Headroom Component</h1>
</Headroom>
```
npm package: @jondkoon/react-native-web
Description: React Native for Web
Author: Nicolas Gallagher
Latest version: 0.5.1-twitter-9377bd1

# react-native-web

"React Native for Web" brings the platform-agnostic Components and APIs of
React Native to the Web. It is used in production by Twitter Lite.

Read more: https://github.com/necolas/react-native-web
npm package: @jondotsoy/artur
Description: Framework to write lite apps
Latest version: 1.1.0

# Artur

Artur is a modern web framework for building web applications with ease. It provides a powerful router system, middleware support, and an easy-to-use API.

## Example Usage

On [Bun](https://bun.sh)

```ts
const router = new Router();

router.use("GET", "/hello", {
  fetch: (request) => new Response("Hello world"),
});

serve({
  port: 3000,
  fetch(request) {
    return router.fetch(request);
  },
});
```

On [NodeJS](https://nodejs.org)

```ts
import { createServer } from "node:http";

const router = new Router();

router.use("GET", "/hello", {
  fetch: (request) => new Response("Hello world"),
});

const server = createServer((req, res) => {
  router.requestListener(req, res);
});

// starts a simple http server locally on port 3000
server.listen(3000, "127.0.0.1", () => {
  console.log("Listening on 127.0.0.1:3000");
});
```

## Installation

To install Artur, simply run the following command in your terminal:

```shell
npm i @jondotsoy/artur
```

## Fetch Router

The `@jondotsoy/artur/http/router` module provides a router manager to handle Request/Response patterns.

```ts
import { Router, params } from "@jondotsoy/artur/http/router";

const router = new Router();

router.use("GET", "/users/:name", {
  fetch: async (request) => {
    const { name } = params(request);
    return new Response(`hello ${name}`);
  },
});

const response = await router.fetch(new Request("http://localhost/users/mark"));

expect(await response.text()).toEqual("hello mark");
```

## Middleware

Middleware wrap the fetch function and modify the input and output of this function.

```ts
router.use("GET", "/hello", {
  middleware: [
    (fetch) => async (request) => {
      const response = await fetch(request);
      return response;
    },
  ],
  fetch: (request) => new Response("ok"),
});
```

## Router

The route describes how to match a request object. To describe a route, use the API `Router.prototype.use(method: string, path_pattern: string)`.

```ts
router.use("GET", "/hello", {
  fetch: (request) => new Response("ok"),
});
```

Methods allow are `GET`, `POST`, `DELETE`, `OPTIONS`, `HEAD`, `PUT`, `PATCH`. Also you can use `ALL` to match any method.

The path pattern use the [URLPattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API) to match the request object. If the path pattern is a string only evaluate the pathname to evaluate the url use a URLPattern object.

```ts
router.use("GET", new URLPattern({ protocol: "https", pathname: "/hello" }), {
  fetch: (request) => new Response("ok"),
});
```

## Catch Errors

By default, the router catch any error and return a response with status 500. You can also customize the response related with a error using the `describeErrorResponse` function. The next sample catch a jwt message and response a response with status 401.

```ts
try {
  verifyHeaderAuthorization(request.headers.get('authorization'));
} catch (ex) {
  if (ex instaceof JWTError) {
    describeErrorResponse(ex, new Response(ex.message, {status: 401}));
  }
  throw ex;
}
```
npm package: @jondotsoy/bert
Description: A task manager inspired on Gulp.
Author: Jonathan Delgado
Latest version: 0.0.3

# 🍹 Bert
A task manager inspired on Gulp.

> This document content the specifications to build the client to Bert.

## Quick start

### Step 1: Write a `.bert.js` file

```javascript
const bert = require('bert')

const node = bert.agent('node', {image: 'node:7.7.0'})

bert.task('taskInfo', () => {
    node.sh('node --version') 
    bert.sh('node --version') 
})
```

### Run the task

```bash
$ bert -V taskInfo
[bert] Prepare agent node (node:7.7.0)
[bert:run] > docker pull node:7.7.0
[bert:run] > docker run -t -d -u 112:116 -w ******** -v ******** -v ******** -e ******** --entrypoint cat node:7.7.0
[bert:run] node> node --version
v7.7.0
[bert:run] > node --version
v7.6.0
```

### Run the task on clear environment

```bash
$ bert -V --empty taskInfo
[WARNING] This is not possible load local agent without docker.
[bert] Prepare agent node (node:7.7.0)
[bert:run] > docker pull node:7.7.0
[bert:run] > docker run -t -d -u 112:116 -w ******** -v ******** -v ******** -e ******** --entrypoint cat node:7.7.0
[bert:run] node> node --version
v7.7.0
```

### Run silet task

```bash
$ bert taskInfo
node> node --version
v7.7.0
> node --version
v7.6.0
```

### Optional: Clear rm you agents

```bash
$ bert -V --clear
[bert] Prepare to remove node (node:7.7.0)
[bert:run] > docker stop --time=1 ********
[bert:run] > docker rm -f ********
```

Features (Commands):
- [ ] Help
- [ ] Init a project with Bert

## Feature: Help
Show a list to help.

    $ bert [help|h|--help|-h]

## Feature: Init

Initialize a Bert file (`.bert.js`).

    $ bert init


## Espect .bert.js file

```javascript
const bert = require('bert')

/* EXAMPLES WITH DOCKER */
/* ==================== */

bert.stage('node')
// CMD Equivalent: docker create node:latest
/* Content .bertlook.json
{
  "stages": {
    "node": "36c4536996ca5615dcf9911f068786dc/a441b15fe9a3cf56661190a0b93b9dec7d04127288cc87250967cf3b52894d11"
  }
}
*/

bert.stage('node', {
  image: 'node:7.7.0'
})
// CMD Equivalent: docker create  node:7.7.0
/* Content .bertlook.json
{
  "stages": {
    "node": "36c4536996ca5615dcf9911f068786dc/a441b15fe9a3cf56661190a0b93b9dec7d04127288cc87250967cf3b52894d11"
  }
}
*/

bert.stage('node', {
  tag: '7.7.0'
})
// CMD Equivalent: docker create node:7.7.0
/* Content .bertlook.json
{
  "stages": {
    "node": "36c4536996ca5615dcf9911f068786dc/a441b15fe9a3cf56661190a0b93b9dec7d04127288cc87250967cf3b52894d11"
  }
}
*/

bert.stage('pepe', {
  image: 'node:7.7.0'
})
// CMD Equivalent: docker create node:7.7.0
/* Content .bertlook.json
{
  "stages": {
    "pepe": "36c4536996ca5615dcf9911f068786dc/a441b15fe9a3cf56661190a0b93b9dec7d04127288cc87250967cf3b52894d11"
  }
}
*/

```


## What is an Agent

## Project Structure

- `bin/`: The script to use bert on console.
- `lib/`:
    - `dotBert/`: Working with the `.bert.js` file.
    - `engine/`: Working with the diferent engines.
        - `docker/`: working with the docker engine.
npm package: @jondotsoy/common-cli
Description: api to connect with docker cli and podman cli
Author: Jonathan Delgado
Latest version: 0.1.1

# @jondotsoy/common-cli

Api to connect with docker cli and podman cli

**Sample:**

```ts
import { podman } from "@jondotsoy/common-cli/podman";

await podman.run({ image: "ubuntu", options: { detach: true } });
```
npm package: @jondotsoy/compatibility_table
Description: Create a compatibility file for your project.
Latest version: 0.1.2

# Tolling to make compatibility tables

Create a compatibility file for your project.

**Example:**

```ts
import { createCompatibilityTable } from "@jondotsoy/compatibility_table";

await createCompatibilityTable({
  versions: ["v1.0.0", "v2.1.0", { version: "v2.4.0", title: "Next" }],
  pattern: "**/*.md",
  outFile: "./compatibility_table.md",
});
```

## API Documentations

Read the full documentation on [api](./docs/api/create-compatibility-table.md)
npm package: @jondotsoy/condition
Description: Conditions for JSON. Receive conditions from outside.
Latest version: 0.2.2

# condition.js

Conditions for JSON. Receive conditions from outside.

**Expressions:**

- equal
- greaterThan
- lessThan
- greaterThanOrEqual
- lessThanOrEqual
- and
- or
- not

**Sample:**

```ts
import { evaluateCondition } from "@jondotsoy/condition";

const condition: ConditionDTO = {
  and: [
    {
      equal: ["a.b", 3],
    },
    {
      not: {
        equal: ["a.c", 4],
      },
    },
  ],
};

const context = {
  a: {
    b: 3,
    c: 3,
  },
};

evaluateCondition(condition, context); // => true
```
npm package: @jondotsoy/date-minecraft
Description: A library to work with Minecraft dates and ticks
Author: Jonathan Delgado
Latest version: 0.1.0

# @jondotsoy/date-minecraft

A library to work with Minecraft dates and ticks.

## Install

```bash
npm install @jondotsoy/date-minecraft
```

## Usage

```ts
import { DateMinecraft } from "@jondotsoy/date-minecraft";

const date = DateMinecraft.fromTick(18000);

console.log(date.tick);        // 18000
console.log(date.hour);        // 18
console.log(date.minute);      // 0
console.log(date.second);      // 0
console.log(date.toString());  // D0T18:00:00.000

console.log(date.toLocaleString()); // Day 0, 18:00:00
```

## API

### `DateMinecraft.fromTick(tick: number): DateMinecraft`

Creates a `DateMinecraft` instance from a given tick value.

### Properties

| Property      | Description                        |
|---------------|------------------------------------|
| `tick`        | Raw tick value                     |
| `hour`        | In-game hour (0–23)                |
| `minute`      | In-game minute (0–59)              |
| `second`      | In-game second (0–59)              |
| `millisecond` | In-game millisecond (0–999)        |

### `date.total({ unit, _fixed? }): number`

Returns the total elapsed time in the given unit.

```ts
date.total({ unit: "hours" })       // total hours as float
date.total({ unit: "days", _fixed: 2 }) // rounded to 2 decimals
```

Supported units: `millisecond`, `milliseconds`, `second`, `seconds`, `minute`, `minutes`, `hour`, `hours`, `day`, `days`.

### `date.toString(): string`

Returns a string in the format `D{day}T{HH}:{mm}:{ss}.{mmm}`.

```
D0T06:00:00.000
```

### `date.toLocaleString(locales?, options?): string`

Returns a human-readable string.

```ts
date.toLocaleString()                              // "Day 0, 18:00:00"
date.toLocaleString(undefined, { hourCycle: "h12" }) // "Day 0, 06:00:00 PM"
date.toLocaleString(undefined, { hourCycle: "h11" }) // "Day 0, 06:00:00 PM"
date.toLocaleString(undefined, { hourCycle: "h23" }) // "Day 0, 18:00:00"
date.toLocaleString(undefined, { hourCycle: "h24" }) // "Day 0, 18:00:00"
```

#### `options.hourCycle`

| Value   | Range  | Description                        |
|---------|--------|------------------------------------|
| `h23`   | 0–23   | 24-hour clock, midnight as `00` (default) |
| `h24`   | 1–24   | 24-hour clock, midnight as `24`    |
| `h12`   | 1–12   | 12-hour clock with AM/PM, midnight as `12` |
| `h11`   | 0–11   | 12-hour clock with AM/PM, midnight as `00` |

## Constants

| Constant               | Value  |
|------------------------|--------|
| `MS_PER_TICK`          | 50     |
| `TICKS_PER_SECOND`     | 20     |
| `TICKS_PER_DAY`        | 24000  |
npm package: @jondotsoy/demo-workspace
Description: Make a workspace to write files easily ideal to write your tests.
Author: Jonathan Delgado
Latest version: 1.1.3

# demo-workspace

Make a workspace to write files easily ideal to write your tests

## How to use

Install with npm

```
npm add @jondotsoy/demo-workspace
```

In your code:

```ts
import { demoWorkspace } from "@jondotsoy/demo-workspace";

const workspace = demoWorkspace();

const file = workspace.file(
  "sample.ts",
  `
    console.log("OK");
  `
);

console.log(file);
// =>
// {
//   location: new URL('file:./__demos__/index/sample.ts')
// }
```

Also, your can be use `Workspace.property.makeTree()` for multiple files.

```ts
const file = workspace.makeTree({
  "README.md": `
    # Sample
  `,
  "src/index.ts": `
    console.log('Ok')
  `,
  "src/configs.json": JSON.stringify({
    foo: "baz",
  }),
});
// =>
// {
//   'README.md': new URL('file:./__demos__/index/README.md'),
//   'src/index.ts': new URL('file:./__demos__/index/src/index.ts'),
//   'src/configs.json': new URL('file:./__demos__/index/src/configs.json')
// }
```
npm package: @jondotsoy/don
Description: DON (Directive Object Notation) - A human-readable data serialization format based on directives and subdirectives for configuration files, infrastructure definitions, and structured data
Author: @jondotsoy
Latest version: 0.0.10

# DON: Directive Object Notation

DON is a human-readable data serialization format designed around the concept of directives and subdirectives. It combines the simplicity of declarative syntax with the flexibility of nested structures, allowing you to define hierarchical configurations using intuitive directive blocks. Each directive can accept arguments and contain nested subdirectives, making it ideal for configuration files, infrastructure definitions, and structured data representation where readability and expressiveness are priorities.

## Features

- **Minimal Syntax**: Fewer special characters, more readability
- **Sequential Processing**: Directives are processed as a pipeline, allowing overwriting and incremental composition
- **Flexible Nesting**: Supports hierarchies of any depth
- **Multiple Data Types**: Keywords, strings, numbers, booleans, and null
- **Heredoc Support**: Multi-line content blocks for embedded scripts and text
npm package: @jondotsoy/express-render-react
Description: Allow to express render react views
Author: Jonathan Delgado
Latest version: 1.0.2

# Express Render React

What is it about? This is a library to render [React Components](https://reactjs.org) or [React Components](https://reactjs.org) with [Styled Components](https://www.styled-components.com) using [Express](http://expressjs.com/).

```javascript
app.get('/', (req, res) =>
  res.renderReact(
    <div>
      <h1>Hi {req.query.name}!</h1>
    </div>
  )
)
```


## How to use

```javascript
import expressRenderReact from '@jondotsoy/express-render-react'
app.use(expressRenderReact())
```

if you source use Styled Components.

```javascript
import expressRenderReact from '@jondotsoy/express-render-react/styled'
app.use(expressRenderReact())
```
npm package: @jondotsoy/filter-async
Description: filterAsync to array elements
Author: Jonathan Delgado
Latest version: 1.0.10

## How to install

```
npm install @jondotsoy/filter-async
```

## How to use

```javascript
// ES5
const {filterAsync} = require("@jondotsoy/filter-async")
// ES6
import filterAsync from "@jondotsoy/filter-async"

await filterAsync([1, 2, 3, 4, 5, 6, 7, 8], async (el, indexEl, arr) => (el % 2 === 0))
// => [2, 4, 6, 8]
```

### use as array.filterAsync

```javascript
// ES5
require("@jondotsoy/filter-async/polyfill")
// ES6
import "@jondotsoy/filter-async/polyfill"

await [1, 2, 3, 4, 5, 6, 7, 8].filterAsync(async (el, indexEl, arr) => (el % 2 === 0))
// => [2, 4, 6, 8]
```
npm package: @jondotsoy/lite-http
Description: Simple HTTP Server
Author: Jonathan Delgado
Latest version: 1.0.0

## Lite HTTP

Simple HTTP Server

**Sample**

```ts
const server = new LiteHTTP();
await server.listen();
server.api(
    "my_api",
    new URLPattern({ pathname: "/my_api" }),
    z.object({ firstName: z.string(), lastName: z.string() }),
    z.object({ fullName: z.string() }),
    async ({ firstName, lastName }) => {
        return { fullName: `${firstName} ${lastName}` };
    },
);

console.log(`Server ready on ${server.toURL()}`); // Server ready on http://localhost:50138/
```

```shell
curl --request POST \
  --url http://localhost:50138/my_api \
  --header 'user-agent: vscode-restclient'

# HTTP/1.1 422 Unprocessable Entity
# Content-Type: application/x-yaml; profile="http://localhost:50138/schemas/my_api.schema.json"
# Date: Wed, 26 Jul 2023 04:34:50 GMT
# Connection: close
# Transfer-Encoding: chunked
# 
# error:
#   - code: invalid_type
#     expected: object
#     received: undefined
#     path: []
#     message: Required
```

```shell
curl --request POST \
  --url http://localhost:50138/my_api \
  --data 'firstName: Jhon\nlastName: Crose'

# HTTP/1.1 200 OK
# Content-Type: application/x-yaml; profile="http://localhost:50138/schemas/my_api.schema.json"
# Date: Wed, 26 Jul 2023 04:38:51 GMT
# Connection: close
# Transfer-Encoding: chunked
# 
# fullName: Jhon Crose
```
npm package: @jondotsoy/open-kv
Description: A JS memory to Set/Get, Queues and Pub/Sub solutions
Latest version: 0.4.0

# Open-KV: A JavaScript Implementation for Key-Value Store, Queues, and Pub/Sub Messaging

Open-KV is an open-source library that provides a simple way to work with key-value stores, queues, and pub/sub messaging using JavaScript. It aims to provide a scalable and flexible solution for building distributed systems.

**Example Usage**

Here's an example of how you can use Open-KV:

```ts
import { open } from "@jondotsoy/open-kv";

const kv = await open();

// Set/Get
await kv.set("foo", "biz");
await kv.get("foo"); // => "biz"
await kv.set("tar", "zaz", { ttl: 100 });
await setTimeout(200);
await kv.get("tar"); // => null

// Queue
await kv.enqueue("foo");
await kv.dequeue(); // => "foo"
await kv.dequeue(); // => null

// Pub/Sub
for await (const message of kv.subscribe()) {
  console.log(message);
  // => "foo"
  // => "biz"
}

await kv.publish("foo");
await kv.publish("biz");
```

## Supported Databases

Open-KV supports the following databases:

- **Memory**: In-memory key-value store
- **Redis**: A popular open-source in-memory data store

With Open-KV, you can easily switch between these two databases depending on your use case and requirements.

## Client KV

The Client KV command-line interface allows you to interact with your key-value store directly from the terminal. This can be particularly useful for quick testing and debugging.

```shell
# Set a key-value pair
kv set foo biz

# Get the value of a key
kv get foo
# Output: biz

# Attempt to get a non-existent key
kv get taz
# Output: (empty)
```