open-index/open-npm huggingface dataset:
npm package: @pstehlik/dharma.js
Description: <img src="https://s3-us-west-2.amazonaws.com/dharma-assets/logo+orange.png"  width=300/>
Author: Nadav Hollander
Latest version: 0.1.76

<img src="https://s3-us-west-2.amazonaws.com/dharma-assets/logo+orange.png"  width=300/>

------------
## Hello, `dharma.js`!

[![CircleCI](https://circleci.com/gh/dharmaprotocol/dharma.js/tree/master.svg?style=svg)](https://circleci.com/gh/dharmaprotocol/dharma.js/tree/master)

This repository contains the `dharma.js` client application development libraries.  `dharma.js` makes it easy for developers who may not be deeply familiar with smart contract development to interact with the various components of Dharma protocol and build hyper-flexible lending applications.

For more information, please check out the [Dharma Developer Portal](https://developer.dharma.io).

## Getting Started with Dharma.js

### Installing Dharma.js

Add Dharma.js to your project using yarn:

```bash
yarn add @dharmaprotocol/dharma.js
```

Alternatively, add Dharma.js to your project using npm:

```bash
npm install @dharmaprotocol/dharma.js --save
```

### Importing Dharma.js

Include Dharma.js in your project code using ES6 style imports (recommended):

```javascript
import { Dharma } from "@dharmaprotocol/dharma.js";
```

Alternatively, include Dharma.js in your project code using _require_ syntax:

```javascript
const { Dharma } = require("@dharmaprotocol/dharma.js");
```

### Instantiating Dharma.js

In order to instantiate Dharma.js, you need to specify a web3 provider.

The web3 provider can either be instantiated directly, or pulled from the browser's window object.

#### Instantiating the web3 provider directly

You'll want to instantiate a web3 provider directly if you're:

- running Dharma.js on a backend
- working with a local blockchain

You'll first import Dharma and Web3 from the Dharma.js package:

```javascript
import { Dharma, Web3 } from "@dharmaprotocol/dharma.js";
```

Assuming you're running a local blockchain on localhost port 8545, you'd specify the provider as follows:

```javascript
const host = "http://localhost:8545";
const provider = new Web3.providers.HttpProvider(host);
```

You'd then pass the above provider to the Dharma constructor, using JavaScript's `new` operator to construct an instance of Dharma connected to your local blockchain:

```javascript
const dharma = new Dharma(provider);
```

#### Pulling the web3 provider off the browser's window object

If the user is interacting with your dApp via a web3 wallet (e.g., MetaMask, Coinbase Wallet, etc.), you can pull the web3 provider from the browser's window object and pass that to the Dharma constructor:

```javascript
const provider = window.web3.currentProvider;

const dharma = new Dharma(provider);
```
npm package: @psteinroe/email-reply-parser
Description: Node library for parsing plain text email content. Based on https://github.com/willdurand/EmailReplyParser
Author: Crisp IM SAS
Latest version: 1.4.1

# Email Reply Parser

[![Test and Build](https://github.com/crisp-oss/email-reply-parser/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/crisp-oss/email-reply-parser/actions?query=workflow%3A%22Test+and+Build%22) [![NPM](https://img.shields.io/npm/v/email-reply-parser.svg)](https://www.npmjs.com/package/email-reply-parser) [![Downloads](https://img.shields.io/npm/dt/email-reply-parser.svg)](https://www.npmjs.com/package/email-reply-parser)

**Email Reply Parser is a node library to parse plain-text email replies and extract content**

This library supports most email replies, signatures and locales.

**😘 Maintainer**: [@baptistejamin](https://github.com/baptistejamin)

## Who uses it?

<table>
<tr>
<td align="center"><a href="https://crisp.chat/"><img src="https://crisp.chat/favicon-256x256.png" height="64" /></a></td>
</tr>
<tr>
<td align="center">Crisp</td>
</tr>
</table>

_👋 You use this library and you want to be listed there? [Contact us](https://crisp.chat/)._

## Installation

Install the project using NPM:

``` javascript
npm install --save email-reply-parser
```

## Features

This library is used at [Crisp](https://crisp.chat/) everyday with around 1 million inbound emails. Over the years, we improved this library so it can work with most emails.

- Strip email replies like `On DATE, NAME <EMAIL> wrote:`
- Supports around **10 locales**, including English, French, Spanish, Portuguese, Italian, Japanese, Chinese.
- Removes signatures like `Sent from my iPhone`
- Removes signatures like `Best wishes`

## Usage

``` javascript
var EmailReplyParser = require("email-reply-parser");

var email =  new EmailReplyParser().read(MY_EMAIL_STRING);

console.log(email.getVisibleText());
```

## Contributing

Feel free to fork this project and submit fixes. We may adapt your code to fit the codebase.

You can run unit tests using:

``` javascript
npm test
```

## Credits

* GitHub
* William Durand <william.durand1@gmail.com>
* Crisp IM

## License

email-reply-parser is released under the MIT License. See the bundled LICENSE file for details.
npm package: @psteinroe/fastify-supabase
Description: A Fastify plugin to use authenticated Supabase clients in your API.
Author: Philipp Steinrötter
Latest version: 0.1.0

# Supabase Plugin for Fastify

A Fastify plugin to use authenticated Supabase clients in your API.

<a href="https://github.com/psteinroe/fastify-supabase/actions/workflows/ci.yml"><img src="https://github.com/psteinroe/fastify-supabase/actions/workflows/ci.yml/badge.svg?branch=main" alt="Latest build" target="\_parent"></a>
<a href="https://github.com/psteinroe/fastify-supabase"><img src="https://img.shields.io/github/stars/psteinroe/fastify-supabase.svg?style=social&amp;label=Star" alt="GitHub Stars" target="\_parent"></a>

## Installation

Install with your favorite package manager.

```bash
pnpm add @psteinroe/fastify-supabase
```

If your package manager does not install peer dependencies automatically, you need to install them too

```bash
pnpm add @fastify/jwt @supabase/supabase-js
```

## Quick Start

First, register `@fastify/jwt` with your Supabase JWT secret. You can obtain it from Supabase Studio.

```ts
import fastifyJWT from "@fastify/jwt";

fastify.register(fastifyJWT, {
  secret: SUPABASE_JWT_SECRET,
});
```

Then, register the Supabase plugin.

```ts
import fastifySupabase from "@psteinroe/fastify-supabase";

fastify.register(fastifySupabase, {
  url: SUPABASE_URL,
  anonKey: SUPABASE_ANON_KEY,
  serviceKey: SUPABASE_SERVICE_KEY,
  // you can pass any `SupabaseClientOptions`
  options: {},
});
```

You can now access a `SupabaseClient` authenticated as the service role directly on the Fastify instance with `fastify.supabaseClient`.

To protect a route and use a user-authenticated `SupabaseClient`, create a `onRequest` route handler to verify the JWT. Note that this is a `@fastify/jwt` feature.

```ts
import { onRequestHookHandler } from "fastify";

export const verifyApiKey: onRequestHookHandler = async (request) => {
  await request.jwtVerify();
};
```

Now pass the hook to the route handler. You can now access either a client authenticated with the service role via the Fastify instance, or a user-authenticated client via the request. Thanks to `@fastify/jwt`, you can also access the Supabase `User` object on the request.

```ts
import { FastifyInstance } from "fastify";

import { verifyApiKey } from "../helpers/verify";

export default async function routes(fastify: FastifyInstance) {
  fastify.get("/health", {
    onRequest: [verifyApiKey],
    handler: async (request, reply) => {
      // authenticated as the user that is making the request
      const { data } = request.supabaseClient.from("article").select("*");

      // authenticated with service role
      const { data } = fastify.supabaseClient.from("article").select("*");

      // access the `User` object on the request
      const tenantId = request.user.app_metadata.tenantId;

      return reply.send("OK");
    },
  });
}
```

Thats it!

---

Fastify Supabase is created by [psteinroe](https://github.com/psteinroe).
Follow [@psteinroe](https://twitter.com/psteinroe) on Twitter for future project updates.
npm package: @pstnly/randomid-generator
Description: ``` yarn add  @pstnly/randomid-generator
Latest version: 1.0.1

# ID GENERATOR

## INSTALL

```
yarn add  @pstnly/randomid-generator

```

```
npm i @pstnly/randomid-generator

```

## USAGE

```
const randomID = require('@pstnly/randomid-generator');

console.log(randomID(10));

```

## LICENSE

MIT