open-index/open-npm huggingface dataset:
npm package: @saverious/daraja
Description: A nodejs library to simplify the integration of safaricom's daraja api
Author: Saverious Ipeni
Latest version: 1.1.1

# @saverious/daraja
## About
`@saverious/daraja` module was designed to simplify integration of daraja api endpoints by reducing not only the
syntax complexity of the raw api, but also the number of required arguments

## Limitations
As of the current date, the module supports only the M-Pesa Express API (stk-push)

# Supported endpoints
- M-Pesa Express

# Install
```text
npm i @saverious/daraja
```

# Usage
```javascript
require('dotenv').config();
const Daraja = require('@saverious/daraja');
const { CONSUMER_KEY, CONSUMER_SECRET, PHONE, CALLBACK } = process.env;

async function payViaMpesa() {
    try{
        const daraja = new Daraja({
            consumer_key : CONSUMER_KEY,
            consumer_secret : CONSUMER_SECRET,
            environment : 'development' 
        });
        
        const response = await daraja.stkPush({
            sender_phone : PHONE,
            payBillOrTillNumber : '174379',
            amount : '1',
            callback_url : CALLBACK
        });
        
        console.log('safaricom response : ', response);
    }catch(e){
        console.log('payment error : ', e);
    }
}

payViaMpesa();
```

# API
## new Daraja(options)
* `options` &lt;object&gt; Set of configurable options to set on the class. Can have the following fields:
    * `consumer_key` &lt;string&gt; Your consumer key from the safaricom portal
    * `consumer_secret` &lt;string&gt; Your consumer secret from the safaricom portal
    * `environment` &lt;string&gt; The current project environment. One of either `development` or `production`

All the three key/value pairs in `options` object are required

## daraja.stkPush(options)
* `options` &lt;object&gt; Options containing payment details. Can have the following fields:
    * `sender_phone` &lt;string&gt; The sender's phone number. `required : true`
    * `payBillOrTillNumber` &lt;string&gt; The account number (Paybill number or Till number) to which funds should
       be sent. `required : true`
    * `amount` &lt;string&gt; The amount to be sent. `required : true`
    * `callback_url` &lt;string&gt; The URL to which the response from safaricom should be sent. `required : true`
    *  `passkey` &lt;string&gt; The passkey from safaricom. `required : true` only if `environment === production`,
        otherwise `required : false`
    * `account_reference` &lt;string&gt;  An Identifier of the transaction for the CustomerPayBillOnline transaction type.
       `required : false`
    * `transaction_desc` &lt;string&gt; Any additional information/comment that can be sent along with the request from
       your system. `required : false`

* `Returns` &lt;Promise&gt;
npm package: @savescum/web
Description: An interactive webinterface, to efficiently save scum on a jailbroken PlayStation 4.
Latest version: 0.1.2

# savescum

A command-line tool & webinterface, to efficiently save scum on a jailbroken PS4.

## 🎯 Features

- ⚡ Blazing fast savegame backup & restore
- 🛠️ Runs as web application or CLI
- 🎮 Gamepad & Keyboard support (__hotkeys__)
- 🔉 Sound notification
- 📦 Suits any game with a single savefile

> **Note**  
> The webinterface is currently in development.

## Documentation

View the documentation and examples at [savescum.jrson.me](https://savescum.jrson.me/) (under construction).

## Installation

Savescum can be installed globally as a Node.js command line tool:

```sh
npm install -g savescum
```

## Usage

After installing, the `savescum` command becomes available and can be run from any directory. Alternatively, you can use savescum with `npx` directly:

```sh
# with global installation
savescum [options] [command]

# or run with npx
npx savescum [options] [command]
```

> **Warning**  
> Remember always backup your saves files!

## Speed comparison

This video shows a speed comparison of savescum methods.

[![Comparison Video](https://raw.githubusercontent.com/jrson83/savescum/main/.github/assets/youtube-comparison-hqdefault.png)](https://www.youtube.com/watch?v=KVDkTK97hJk)

## License

Licensed under the [MIT license](https://github.com/jrson83/ps4-savescum/blob/main/LICENSE).
npm package: @savethis/cli
Description: CLI tool to download and organize Gmail attachments from multiple accounts
Author: Ilias Ismanalijev
Latest version: 0.1.0

# @savethis/cli

This is a scoped package wrapper around the [savethis](https://www.npmjs.com/package/savethis) CLI tool.

## Installation

```bash
npm install -g @savethis/cli
```

## Usage

See the [savethis documentation](https://github.com/illyism/savethis) for usage instructions.
npm package: @savi2w/chess-tcn
Description: Encode and decode helpers for TCN algo from https://www.chess.com/
Author: Weslen Guerreiro
Latest version: 1.0.0

# Chess TCN

Encode and decode helpers for TCN algo from https://www.chess.com/

## Usage

```javascript
import tcn from "@savi2w/chess-tcn";

tcn.decode("mC"); // { from: "e2", to: "e4" }
tcn.encode({ from: "e2", to: "e4" }); // mC
```

## License

This project is distributed under the [MIT license](LICENSE).
npm package: @savi2w/npm-publish
Description: [![npm-publish](https://github.com/savi2w/npm-publish/workflows/npm-publish/badge.svg?branch=main)](https://github.com/savi2w/npm-publish/actions)
Author: savi2w
Latest version: 1.0.4

# NPM Publish

[![npm-publish](https://github.com/savi2w/npm-publish/workflows/npm-publish/badge.svg?branch=main)](https://github.com/savi2w/npm-publish/actions)

## License

This project is distributed under the [MIT license](LICENSE)
npm package: @savi2w/reamv
Description: ⚠️ Deprecated
Author: Weslen Guerreiro
Latest version: 1.0.0

# ReAMV

⚠️ Deprecated

***

Don't judge me, I'm in quarantine with nothing to do 🤷

## Example

[![Screenshot of a anime music video](https://i.imgur.com/k1fijBW.png)](https://youtu.be/0iaD8gVGXMI)

## Dependencies

- FFmpeg `>= 4.2.3`
- Python `>= 3.8.3`
- youtube-dl `>= 2020.06.16.1`

## Usage

### API

```javascript
const reamv = require("@savi2w/reamv");

const result = await reamv.bootstrap();
```

### CLI

```sh
$ npx @savi2w/reamv
```

## License

This project is distributed under the [MIT license](LICENSE)
npm package: @savi2w/yup-of-json
Description: Convert JSON to a yup schema
Author: Weslen Guerreiro
Latest version: 1.0.0

# Yup of JSON

Convert JSON to a [`yup`](https://github.com/jquense/yup) schema

- [Try it now!](https://yup-of-json.savi2w.moe/)

## Usage

```typescript
import parse from "@savi2w/yup-of-json";
```

## Example

- JSON Schema

```json
{
  "addresses": {
    "raw": "Kukuroo Mountain"
  },
  "age": 14,
  "github": "https://github.com/savi2w",
  "hunter": true,
  "name": "Killua Zoldyck",
  "role": null,
  "tags": [
    {
      "label": "cute"
    }
  ]
}
```

- Result

```typescript
yup
  .object()
  .shape({
    addresses: yup
      .object()
      .shape({ raw: yup.string().required() })
      .noUnknown()
      .required(),
    age: yup.number().required(),
    github: yup.string().required(),
    hunter: yup.boolean().nullable(),
    name: yup.string().required(),
    role: yup.mixed().nullable(),
    tags: yup
      .array()
      .of(
        yup
          .object()
          .shape({ label: yup.string().required() })
          .noUnknown()
          .required()
      )
      .defined(),
  })
  .noUnknown()
  .required();
```

## License

This project is distributed under the [MIT license](LICENSE)
npm package: @savicontrols/crypto-browserify
Description: implementation of crypto for the browser
Author: Dominic Tarr
Latest version: 3.12.0-savi-beta-1

# crypto-browserify

A port of node's `crypto` module to the browser.

[![Build Status](https://travis-ci.org/crypto-browserify/crypto-browserify.svg?branch=master)](https://travis-ci.org/crypto-browserify/crypto-browserify)
[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/crypto-browserify.svg)](https://saucelabs.com/u/crypto-browserify)

The goal of this module is to reimplement node's crypto module,
in pure javascript so that it can run in the browser.

Here is the subset that is currently implemented:

* createHash (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
* createHmac (sha1, sha224, sha256, sha384, sha512, md5, rmd160)
* pbkdf2
* pbkdf2Sync
* randomBytes
* pseudoRandomBytes
* createCipher (aes)
* createDecipher (aes)
* createDiffieHellman
* createSign (rsa, ecdsa)
* createVerify (rsa, ecdsa)
* createECDH (secp256k1)
* publicEncrypt/privateDecrypt (rsa)
* privateEncrypt/publicDecrypt (rsa)

## todo

these features from node's `crypto` are still unimplemented.

* createCredentials

## contributions

If you are interested in writing a feature, please implement as a new module,
which will be incorporated into crypto-browserify as a dependency.

All deps must be compatible with node's crypto
(generate example inputs and outputs with node,
and save base64 strings inside JSON, so that tests can run in the browser.
see [sha.js](https://github.com/dominictarr/sha.js)

Crypto is _extra serious_ so please do not hesitate to review the code,
and post comments if you do.

## License

MIT
npm package: @savid/esbuild-register-loader
Description: Node.js experimental loader to load ts/tsx files for [esbuild-register](https://github.com/egoist/esbuild-register) when ES modules are enabled.
Author: Andrew Davis
Latest version: 1.0.1

# @savid/esbuild-register-loader

Node.js experimental loader to load ts/tsx files for [esbuild-register](https://github.com/egoist/esbuild-register) when ES modules are enabled.

[Related issue](https://github.com/egoist/esbuild-register/issues/26)

## Usage

```bash
node -r esbuild-register --experimental-loader @savid/esbuild-register-loader index.ts
```

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @savid/libp2p-peeper
Description: Discover [libp2p](https://libp2p.io/) peers with the [Node Discovery Protocol v5](https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md).
Author: Andrew Davis
Latest version: 1.0.0

# @savid/libp2p-peeper

Discover [libp2p](https://libp2p.io/) peers with the [Node Discovery Protocol v5](https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md).

This package is adapted from the [@chainsafe/discv5](https://github.com/ChainSafe/discv5) project.

## Requirements

- NodeJS v18+
- ESM only

## Install

```bash
npm install --save @savid/libp2p-peeper
```

## Usage

Add bootnodes to begin;
```typescript
import peeper from '@savid/libp2p-peeper';

const bootnodes = [
  'enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk',
];

try {
  for await (const { error, enr } of peeper({ bootnodes })) {
    if (error) throw error;
    // https://ethereum.org/en/developers/docs/networking-layer/network-addresses/#enr
    if (enr) console.log(enr);
  }
} catch (error) {
  console.error(error);
}
```

## API

```typescript
async function* peeper(options: {
  // list of EIP-778: Ethereum Node Records (ENR) bootnodes
  bootnodes: string[];
  // min number of candidate peers to retrieve from DNS records when attempting to discover new nodes
  minConnections?: number;
  // max number of candidate peers to retrieve from DNS records when attempting to discover new nodes
  maxConnections?: number;
}): AsyncGenerator<{
  enr?: string | undefined;
  error?: Error | undefined;
}>;
```

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @savid/rlpx-peeper
Description: Discover [RLPx](https://github.com/ethereum/devp2p/blob/master/rlpx.md) peers with the [eth/66](https://eips.ethereum.org/EIPS/eip-2481) protocol.
Author: Andrew Davis
Latest version: 1.2.0

# @savid/rlpx-peeper

Discover [RLPx](https://github.com/ethereum/devp2p/blob/master/rlpx.md) peers with the [eth/66](https://eips.ethereum.org/EIPS/eip-2481) protocol.

This package is adapted from the [@ethereumjs/devp2p](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/devp2p) project.

## Requirements

- NodeJS v18+
- ESM only

## Install

```bash
npm install --save @savid/rlpx-peeper
```

## Usage

Manually adding boot nodes and dns networks;
```typescript
import peeper from '@savid/rlpx-peeper';

const dnsNetworks = [
  'enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net',
];

const bootnodes = [
  {
    id: Buffer.from(
      'd860a01f9722d78051619d1e2351aba3f43f943f6f00718d1b9baa4101932a1f5011f16bb2b1bb35db20d6fe28fa0bf09636d26a87d31de9ec6203eeedb1f666',
      'hex',
    ),
    ip: '18.138.108.67',
    port: 30303,
  },
];

try {
  for await (const { error, enode } of peeper({ bootnodes, dnsNetworks })) {
    if (error) throw error;
    if (enode) console.log(enode);
  }
} catch (error) {
  console.error(error);
}
```

Consuming [`@ethereumjs/common`](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/common) chains;
```typescript
import peeper from '@savid/rlpx-peeper';
import chain from '@ethereumjs/common/dist/chains/mainnet.json' assert { type: 'json' };

const bootnodes = chain.bootstrapNodes.map((bootnode) => ({
  id: Buffer.from(bootnode.id, 'hex'),
  ip: bootnode.ip,
  port: bootnode.port,
}));

const { dnsNetworks } = chain;

try {
  for await (const { error, enode } of peeper({ bootnodes, dnsNetworks })) {
    if (error) throw error;
    if (enode) console.log(enode);
  }
} catch (error) {
  console.error(error);
}
```

## API

```typescript
async function* peeper(options: {
  // EIP-1459 ENR tree urls to query for peer discovery
  dnsNetworks?: string[];
  // boot node peers
  bootnodes?: { id: Buffer; ip: string; port: number }[];
  // interval for peer table refresh
  refreshInterval?: number;
  // max number of candidate peers to retrieve from DNS records when attempting to discover new nodes
  maxPeers?: number;
  // DNS server to query DNS TXT records from for peer discovery
  dnsAddress?: string;
}): AsyncGenerator<{
  enode?: string | undefined;
  error?: Error | undefined;
}>;
```

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @savid/shutdown
Description: Graceful shutdown handling for NodeJS
Author: Andrew Davis
Latest version: 1.0.4

# @savid/shutdown

Graceful shutdown handling for NodeJS

## Usage

```js
import Shutdown from '@savid/shutdown';

// register to log unhandled/uncaught exceptions
Shutdown.register('unhandled', async (error) => {
  if (error) console.error('unhandled shutdown error', error);
});

// register an async database shutdown handler
Shutdown.register('database', async (error) => {
  // wait for database to gracefully shutdown
  await database.shutdown();
});

// register an async webserver shutdown handler
Shutdown.register('webserver', async (error) => {
  // if an unhandled/uncaught exception happened, it might make sense to ungracefully terminate
  if (error) return;
  // wait for webserver to gracefully shutdown
  await webserver.shutdown();
});

// allow handling errors thrown from registered shutdown handlers for a chance to log the exception
Shutdown.on('error', ({ error, register }) => {
  console.error(`shutdown handler error: ${register}`, error);
});

// deregister an existing registered handler
Shutdown.deregister('database');
```

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @savignano/use-flex
Description: Use component props to define flex css.
Author: Paul Savignano
Latest version: 0.1.1

<h1 align="center">Use Flex</h1>

<div align="center">

Use component props to define flex css.

[![NPM Version](https://img.shields.io/npm/v/@savignano/use-flex.svg?style=flat)](https://www.npmjs.com/package/@savignano/use-flex)
[![NPM Downloads](https://img.shields.io/npm/dm/@savignano/use-flex.svg?style=flat)](https://npmcharts.com/compare/@savignano/use-flex?minimal=true)
[![CircleCI](https://img.shields.io/circleci/build/github/PaulSavignano/use-flex/master.svg)](https://circleci.com/gh/PaulSavignano/use-flex/tree/master)
[![codecov.io](https://codecov.io/gh/PaulSavignano/use-flex/branch/master/graph/badge.svg)](https://codecov.io/gh/PaulSavignano/use-flex)
[![BundleSize](https://img.shields.io/bundlephobia/minzip/@savignano/use-flex.svg)](https://bundlephobia.com/result?p=@savignano/use-flex)
[![Dependencies](https://david-dm.org/PaulSavignano/use-flex/master/status.svg)](https://david-dm.org/PaulSavignano/use-flex/master)
[![DevDependencies](https://david-dm.org/PaulSavignano/use-flex/master/dev-status.svg)](https://david-dm.org/PaulSavignano/use-flex/master?type=dev)
[![PeerDependencies](https://david-dm.org/PaulSavignano/use-flex/master/peer-status.svg)](https://david-dm.org/PaulSavignano/use-flex/master?type=peer)
[![Patreon](https://img.shields.io/badge/patreon-support%20the%20author-blue.svg)](https://www.patreon.com/PaulSavignano)

</div>

use-flex is a JavaScript library for styling user interfaces.

* **Declarative:** Define the styles you need and enjoy the benefit of cached css without the cost of inline style redefinition.
* **Flexible:** No pun intended.  Props that do not have css definitions will be inline styled.  You may also pass a style prop.  Have a className you'd like incorporated?  Pass in a className prop and have it concatenated.
* **Powerful:** Have your own css classes?  Pass a customMapping object and serve your own css with component props.
<br />

## Installation
```
npm install @savignano/use-flex
```

## Usage
Here is an example to get you started:

```jsx
import React from 'react';
import ReactDOM from 'react-dom';
import useFlex from '@savignano/use-flex';

function Section({ children, ...rest }) {
  const { className, style } = useFlex(rest)
  return (
    <section className={className} style={style}>
      {children}
    </section>
  )
}

function App() {
  return (
    <Section alignItems="center" flexFlow="row wrap" justifyContent="center">
      <p>This</p>
      <p>content</p>
      <p>is horizontal</p>
    </Section>
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));
```

## Examples
[Codesandbox](https://codesandbox.io/s/use-flex-4rhj7?fontsize=14&hidenavigation=1&theme=dark)

## Contributing
- see CONTRIBUTING.md