open-index/open-npm huggingface dataset:
npm package: @jshiohaha/litesvm
Description: <div align="center">     <img src="https://raw.githubusercontent.com/litesvm/litesvm/master/logo.jpeg" width="50%" height="50%"> </div>
Latest version: 0.3.8

<div align="center">
    <img src="https://raw.githubusercontent.com/litesvm/litesvm/master/logo.jpeg" width="50%" height="50%">
</div>

---
# LiteSVM (NodeJS)

This is the NodeJS wrapper for [LiteSVM](https://github.com/LiteSVM/litesvm). It brings best-in-class Solana testing
to NodeJS, giving you a powerful, fast and ergonomic way to test Solana programs in TS/JS.

For a standard testing workflow, LiteSVM offers an experience superior to `solana-test-validator` (slow, unwieldy)
and `bankrun` (reasonably fast and powerful, but inherits a lot of warts from `solana-program-test`).

## Minimal example

This example just transfers lamports from Alice to Bob without loading
any programs of our own. It uses the [Node.js test runner](https://nodejs.org/api/test.html).

```ts
import { test } from "node:test";
import assert from "node:assert/strict";
import { LiteSVM } from "litesvm";
import {
	PublicKey,
	Transaction,
	SystemProgram,
	Keypair,
	LAMPORTS_PER_SOL,
} from "@solana/web3.js";

test("one transfer", () => {
	const svm = new LiteSVM();
	const payer = new Keypair();
	svm.airdrop(payer.publicKey, BigInt(LAMPORTS_PER_SOL));
	const receiver = PublicKey.unique();
	const blockhash = svm.latestBlockhash();
	const transferLamports = 1_000_000n;
	const ixs = [
		SystemProgram.transfer({
			fromPubkey: payer.publicKey,
			toPubkey: receiver,
			lamports: transferLamports,
		}),
	];
	const tx = new Transaction();
	tx.recentBlockhash = blockhash;
	tx.add(...ixs);
	tx.sign(payer);
	svm.sendTransaction(tx);
	const balanceAfter = svm.getBalance(receiver);
	assert.strictEqual(balanceAfter, transferLamports);
});
```
Note: by default the `LiteSVM` instance includes some core programs such as
the System Program and SPL Token.

## Installation

```
yarn add litesvm
```

## Contributing

Make sure you have Yarn and the Rust toolchain installed.

Then run `yarn` to install deps, run `yarn build` to build the binary and `yarn test` to run the tests.
npm package: @jshooks/use-input
Description: React Hook to input with validator
Author: Alex Lee
Latest version: 1.0.4

# @jshooks/use-input

React Hook to input with validator

## Installation

```bash
npm install @jshooks/use-input
```

## Usage

```js
import useInput from "@jshooks/use-input";

const App = () => {
  const validator = (value) => value.length <= 20;
  const name = useInput("Mr.", validator);
  return (
    <div className="App">
      <h1>Hello</h1>
      <input placeholder="Name" {...name} />
    </div>
  );
};
```
npm package: @jshooks/use-tabs
Description: React Hook to manage tabs
Author: Alex Sungs Lee
Latest version: 1.0.0

# @jshooks/use-tabs

React Hook to manage tabs

## Installation

```bash
npm install @jshooks/use-tabs
```

## Usage

```js
import useTabs from "@jshooks/use-tabs";

const tabs = [
  {
    tab: "Section 1",
    content: "Content of the Section 1",
  },
  {
    tab: "Section 2",
    content: "Content of the Section 2",
  },
];

const App = () => {
  const { currentItem, changeItem } = useTabs(0, tabs);
  return (
    <div className="App">
      {tabs.map((section, index) => (
        <button onClick={() => changeItem(index)}>{section.tab}</button>
      ))}
      <div>{currentItem.tabs}</div>
    </div>
  );
};
```
npm package: @jshooks/use-title
Description: React Hook to set title
Author: Alex Sungs Lee
Latest version: 1.0.0

# @jshooks/use-title

React Hook to set title

## Installation

### NPM

```bash
npm install @jshooks/use-title
```

### Yarn

```bash
yarn add @jshooks/use-title
```

## Usage

```js
import React from "react";
import useTitle from "@jshooks/use-title";

function App() {
  useTitle("Welcome");
  return (
    <div className="App">
      <h1>Welcome</h1>;
    </div>
  )
}
```
npm package: @jshsj/timer
Description: A tiny interval timer
Author: @JSHSJ
Latest version: 0.0.1

# Timer

Small timer component for different interval timings.
Very much still WIP. Wanted to set up my own timer component for 
work and learn some lit along the way.

## Project status 

- [x] Setup timer
- [x] Make multiple intervals work
- [x] Allow different templates
- [x] Rought notifications
- [ ] Allow editing and saving custom templates
- [ ] Make it more beautiful
- [ ] Improve Notifications
- [ ] Make it more configurable (styles, intl)

## Setup

Install dependencies:

```bash
npm i
```

## Build

This sample uses the TypeScript compiler to produce JavaScript that runs in modern browsers.

To build the JavaScript version of your component:

```bash
npm run build
```

To watch files and rebuild when the files are modified, run the following command in a separate shell:

```bash
npm run build:watch
```

Both the TypeScript compiler and lit-analyzer are configured to be very strict. You may want to change `tsconfig.json` to make them less strict.
npm package: @jshsj/with-arrow-controls
Description: Control selectable node with arrows
Author: Joshua Stübner
Latest version: 0.0.2

# With Arrow Controls

Small utility library to enable arrow controls for focussable elements inside a container.

## Usage

Simple: 
Looks for elements with [data-with-arrowcontrols] and enables arrow controls for all focussable elements within.

```js
withArrowControls()
```

You can customise the selector with the first argument, e.g.:

```js
withArrowControls(".your-controlled-containers")
```

## Config

You can also pass a config to customise the behaviour even further. These are the options:

```ts
export type TConfig = {
    /**
     * If set to true, the arrows will wrap from last to first and vice versa.
     * @default: true
     */
    wrapControls: boolean;
    /**
     * If set to true, elements that can't be tabbed will be ignored.
     * @default: true
     */
    ignoreUntabbable: boolean;
    /**
     * If set to true, prevent default events. Usually used to give more flexibility, so radio groups dont prevent function.
     * If you only have a group of radio inputs, set it to false to check them.
     * @default: true
     */
    preventDefault: boolean;
    /**
     * Customise the child selector. This is for more advanced usecases, probably.
     * Will be used inside rootElement.querySelectorAll(yourSelector)
     * @default: undefined
     */
    customSelector?: string;
};
```


## Cleanup 

If you need / want to cleanup the listeners, `withArrowControls` returns an Array of `{ unsubscribe: () = void } ` objects, that you can use to unsubscribe.

```js
const subscriptions = withArrowControls();
subscriptions.forEach(s => s.unsubscribe());
```

### Caveats

- If the elements inside your container change, by either adding an element or enabling an element for example,
the function needs to be called again.


### Outlook

Might look into adding a mutation observer to handle DOM updates.
Also maybe add tests.

### Inspirations

https://github.com/argyleink/roving-ux

Adam's library. Does the same, probably better. ¯\_(ツ)_/¯
npm package: @jshunters/jutil
Description: Javascript helper functions for json object grouping and sorting
Author: Shanmuganathan, Anjali
Latest version: 1.0.2

# group-object
Javascript helper functions for json object grouping and sorting for multiple properties

![npm](https://img.shields.io/npm/v/@jshunters/jutil?color=green&style=flat-square)   ![NPM](https://img.shields.io/npm/l/@jshunters/jutil)  ![GitHub issues](https://img.shields.io/github/issues/jshunters/jutil)  ![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@jshunters/jutil)

## Installation

Install with npm

```
npm install @jshunters/jutil
```

## Usage

Include the module

## Options available 




### for grouping 

```javascript
//we can pass either a single property
jutil.group(arrObj,'price');

//we can pass either  multiple properties as array
jutil.group(arrObj,['price','city']);
```

### for sorting

```javascript
// we can pass single property 
jutil.objSort(arrObj,'city');

// we can pass array of properties 
jutil.objSort(arrObj,['city','state','price']);

// we can pass s properties with order as object
jutil.objSort(arrObj,{'city':1,'state':1,'price':-1});
```

### for others

```javascript
// to find the size of Object
jutil.size(arrObj);

// to get chunk of array
jutil.chunk(arrObj,3);
```

```javascript
var jutil = require('@jshunters/jutil');
// group an object for multiple properties

let arrObj = [{
    "h_id": "3",
    "city": "Dallas",
    "state": "TX",
    "zip": "75201",
    "price": "162500"
},
{
    "h_id": "4",
    "city": "Bevery Hills",
    "state": "CA",
    "zip": "90210",
    "price": "319250"
},
{
    "h_id": "6",
    "city": "Dallas",
    "state": "TX",
    "zip": "75000",
    "price": "556699"
},
{
    "h_id": "5",
    "city": "New York",
    "state": "NY",
    "zip": "00010",
    "price": "962500"
}
];

var groupedData = jutil.group(arrObj,['price','city']);
console.log(groupedData); 

var groupedData = jutil.group(arrObj,'city');
console.log(groupedData);

// asynchronous functions for grouping
jutil.groupObject(arrObj,['price','city']).then((groupedData)=>{
    console.log(groupedData)
}).catch(err=>{
    console.log(err);
});

jutil.groupObject(arrObj,'city').then((groupedData)=>{
    console.log(groupedData)
}).catch(err=>{
    console.log(err);
});

// sort a json object for multiple properties
let sortedData = jutil.objSort(arrObj,['city','state','price']);
console.log(sortedData); 

// sort for multiple keys with defined order where 1/-1 is for ascending/descending orders
let sortedData = jutil.objSort(arrObj,{'city':1,'state':1,'price':-1});
console.log(sortedData); 

// sort for single property
var sortedData = jutil.objSort(arrObj,'city');
console.log(sortedData); 

// get chunk of array
var chunk_array = jutil.chunk(arrObj,3);
console.log(chunk_array); 
```
## Notes

Javascript helper functions for json object grouping and sorting for multiple properties

## License

**MIT**
npm package: @jsiebern/bs-material-ui-ppx
Description: This is a ppx for using the withStyles component in @jsiebern/bs-material-ui
Author: Jonathan Siebern
Latest version: 2.1.0

# Reason PPX addition for @jsiebern/bs-material-ui

This library creates a code extension for conveniently using the `withStyles` functionality of MaterialUi in a typesafe way.

Check out the documentation here: [https://jsiebern.github.io/bs-material-ui/](https://jsiebern.github.io/bs-material-ui/)
npm package: @jsiebern/bs-react-sticky
Description: Reason bindings for the react-sticky package
Author: Jonathan Siebern
Latest version: 1.0.0

# Reason bindings for react-sticky
This library provides Reason bindings for
[react-sticky](https://github.com/captivationsoftware/react-sticky).

*These bindings should be complete and working, I use them in production without problems. If, however, you encounter any problems, feel free to open an issue.*

## Installation (for your Reason project)

Run:

    yarn add react-sticky @jsiebern/bs-react-sticky

to add the library to your project dependencies. And add `@jsiebern/bs-react-sticky` to the `bs-dependencies` node of your `bsconfig.json`.

## Example

[See this link for the full example.](https://github.com/jsiebern/bs-react-sticky/blob/master/examples/Example.re)

```reason
let component = ReasonReact.statelessComponent("App");

let make = _children => {
  ...component,
  render: _self =>
    <ReactSticky.StickyContainer>
      <ReactSticky.Sticky>
        ...(
             stickyProps =>
               ReactSticky.Sticky.RenderProps.(
                 <div style=(stickyProps |. style)>
                   ((stickyProps |. isSticky ? "Moving" : "Not Moving") |. ReasonReact.string)
                 </div>
               )
           )
      </ReactSticky.Sticky>
    </ReactSticky.StickyContainer>,
};
```

**Important**: The bindings use an [abstract object type](https://bucklescript.github.io/docs/en/generate-converters-accessors.html#abstract-type), so the easiest thing to access the `stickyProps` is to open `ReactSticky.Sticky.RenderProps` and then access the render functions props by the chain operator (e.g. `stickyProps |. isSticky`).
npm package: @jsier/deep-value
Description: Safely resolves deep value of an object or array by providing path to the targeted property.
Author: Seid Mehmedovic
Latest version: 1.2.1

# @jsier/deep-value
A simple, efficient and lightweight package without external dependencies intended for safely resolving deep value of an object or array by providing path to the targeted property. `deepValue` is built with [TypeScript](http://www.typescriptlang.org/) (preserves full compatibility with pure JavaScript) and is easy to use. 


## Getting Started
```bash
$ npm install @jsier/deep-value --save
```


## Usage
`deepValue` as first argument expects object or array as a source. Second argument should be string representing the path to the targeted property.
Non-existing properties or invalid paths provided will return undefined as the result.

```javascript
import { deepValue } from '@jsier/deep-value';

const employee = {
  name: 'Gia',
  age: 44,
  gender: null,
  skills: [['ts', 'js'], ['en', 'fr']],
  children: [{name: 'Mia'}]
};

deepValue(employee, 'name'); // -> 'Gia'
deepValue(employee, 'gender'); // -> null
deepValue(employee, 'skill[0]'); // -> ['ts', 'js']
deepValue(employee, 'skill[0][1]'); // -> 'js'
deepValue(employee, 'children[0].name'); // -> 'Mia'
deepValue(employee.children, '[0].name'); // -> 'Mia'
deepValue(employee.children, '[0].gender'); // -> undefined
```


## Support
All suggestions and improvements are welcomed and appreciated.


## License
The [MIT License](https://github.com/seidme/jsier/blob/master/LICENSE).
npm package: @jsier/retrier
Description: Promise based retry logic.
Author: Seid Mehmedovic
Latest version: 1.2.4

# @jsier/retrier
**Promise based retry logic**

A simple, efficient and lightweight package without external dependencies which helps quickly implement JavaScript promise based retry logic. **Retrier** class is built with [TypeScript](http://www.typescriptlang.org/) (preserves full compatibility with pure JavaScript) and exposes intuitive and easy-to-use API. 

**Supports:**
- First attempt delay
- Delay between attempts
- Limiting number of attempts
- Callback to stop retrying if some condition is met (e.g. specific error is encountered)
- Callback to keep retrying if some condition is met (e.g. resolved value is unsatisfactory)


## Getting Started
```bash
$ npm install @jsier/retrier --save
```

## Usage
Retrier constructor as a first argument expects function which returns a promise. Second argument is optional and expects [retry options](#retry-options) object.

```javascript
import { Retrier } from '@jsier/retrier';

const options = { limit: 5, delay: 2000 };
const retrier = new Retrier(options);
retrier
  .resolve(attempt => new Promise((resolve, reject) => reject('Rejected!')))
  .then(
    result => console.log(result),
    error => console.error(error) // After 5 attempts logs: "Rejected!"
  );
```

## Retry Options
By default, the retrier will retry until provided promise resolves successfully or until retry limit is reached. To override the defaults please see retry options below:

Property | Description | Type | Default
--- | --- | --- | ---
`limit` | Number of attempts. | number | `1`
`delay` | Delay between attempts in milliseconds. | number | `0`
`firstAttemptDelay` | Delay first attempt. | number | `0`
`keepRetryingIf` | Treat resolved value as invalid and keep retrying - if provided function returns truthy value. Example: `keepRetryingIf: (response, attempt) => response.status === 202;` | Function | `undefined`
`stopRetryingIf` | Stop retrying (reject) if specific error - (provided function returns truthy value). Example: `stopRetryingIf: (error, attempt) => error.status === 500;` | Function | `undefined`


## Support
All suggestions and improvements are welcomed and appreciated.


## License
The [MIT License](https://github.com/seidme/jsier/blob/master/LICENSE).
npm package: @jsierles/ex-navigation
Description: Route-centric navigation libary for React Native.
Author: Adam Miskiewicz
Latest version: 1.3.4

# ExNavigation

A route-centric Navigation library for React Native, powered by "NavigationExperimental".

---

*__Note:__ Documentation is coming soon! For now, check out the example project in `example/`. This lib is very much a work in progress. It was developed in conjunction with the li.st Android app, and had a lot of internal ties to the li.st codebase. We've worked on a cleaning up a bunch, but it's not exactly where we'd like it to be yet. Stay tuned in the next few weeks for docs and more code cleanup.*

### How to run the example project:

This will start the packager for react-native:

```
git clone git@github.com:exponentjs/ex-navigation.git
cd ./ex-navigation
npm install
npm run run-example
```

Open a new terminal to deploy to the simulator.

```
cd ./example/ExNavigationExample
react-native run-ios
```

OR

```
cd ./example/ExNavigationExample
react-native run-android
```