open-index/open-npm huggingface dataset:
npm package: @joner/discord-bitfield-calculator
Description: input your discord bitfield and it will return an array of the permission names
Author: jonah
Latest version: 1.0.3

# Calculate Discord Bitfield or Permissions

## Usage

```ts
import {
  genPermissions,
  genBitfield,
} from "@joner/discord-bitfield-calculator";

genPermissions(0x0000000000000001); // => ["CREATE_INSTANT_INVITE"]

genBitfield("CREATE_INSTANT_INVITE"); // => 0x1
```
npm package: @jones-dao/sdk
Description: Jones DAO - SDK
Author: 0xIvan
Latest version: 2.1.1

# Jones Dao SDK

## ABI

Manually generated. To update:

1. Make sure that the folders `contracts/` and `farms` are on the same directory as this repo.
2. Compile contracts by running `yarn compile` in the respective folders.
3. Run this code below in your terminal.

Contracts:

```
cd src/abi && ln -s ../../contracts/build/contracts compiled-contracts && .. && ..
```

Farms:

```
cd src/abi && ln -s ../../contracts/build/contracts compiled-farm-contracts && .. && ..
```

4. Update contract abi's by running `yarn updateAbis`
5. Compile types based on these updated abi's by running `yarn compileAbis`. Generated by [typechain](https://www.npmjs.com/package/typechain).

## Constants

### Addresses

Relevant addresses to Jones DAO.

### Coingecko ids

Ids used to fetch price on coingecko for relevant tokens.

## Utils

Helper functions
npm package: @jones.tristand/integrators
Description: A simple package containing methods for numerical integration of systems of differential equations.
Author: Tristan Jones
Latest version: 1.0.1

# @jones.tristand/integrators
[![NPM version](https://badge.fury.io/js/%40jones.tristand%2Fintegrators.svg)](https://npmjs.org/package/@jonestristand/integrators)

A simple package containing methods for numerical integration of systems of differential equations. Includes a simple Euler integrator and a fourth-order Runge-Kutta (RK4) integrator. This package also includes typings in the package and can be used with TypeScript directly.

## Installation

```sh
$ npm install --save @jones.tristand/integrators
```

## Usage

### JavaScript
```js
var integrators = require('@jones.tristand/integrators');

var y0 = [1, 1];
var dydt = function(y, t) {
  return [
    y[0],   // dydt[0] = y[0]
    y[1]    // dydt[1] = y[1]
  ]
};
var t0 = 0;
var dt = 0.01;

var rk = new integrators.rk4(y0, dydt, t0, dt);

rk.step(100);

console.log(rk.y);
// Output: [ 2.718281828234404, 2.718281828234404 ]
```

### TypeScript
```ts
import { rk4, euler } from '@jones.tristand/integrators';

const y0:number[] = [1, 1];
const dydt = (y:number[], t:number):number[] => {
  return [
    y[0],   // dydt[0] = y[0]
    y[1]    // dydt[1] = y[1]
  ]
};
const t0:number = 0;
const dt:number = 0.01;

var rk = new rk4(y0, dydt, t0, dt);

rk.step(100);

console.log(rk.y);
// Output: [ 2.718281828234404, 2.718281828234404 ]
```

## Testing

```sh
$ npm test
```

## License

MIT © [Tristan Jones](http://www.tdjones.ca)
npm package: @joneslloyd/h2alagut
Description: H2alagút – A fetch adapter for Node.js that performs HTTP/2 requests with optional HTTP/1 proxy tunneling via HTTP CONNECT.
Author: Your Name
Latest version: 1.0.5

# h2Alagút

**h2Alagút** is a fetch adapter for Node.js that uses HTTP/2 to perform requests and can tunnel through an HTTP/1 proxy via HTTP CONNECT. The name is inspired by the Hungarian word _alagút_ (meaning "tunnel").

## Features

- **HTTP/2:** Utilizes Node's built‑in [http2](https://nodejs.org/api/http2.html) module.
- **Proxy Tunneling:** Automatically tunnels through an HTTP/1 proxy (via HTTP CONNECT) when a `proxy` configuration is provided.
- **Fetch-like API:** Provides a drop‑in replacement for the standard Fetch API. The returned `Response` object supports properties such as `status` and methods like `text()` and `json()`.

## Installation

`npm install h2alagut` or `yarn add h2alagut` or `pnpm add h2alagut`

## Usage

```js
import { fetch } from "h2alagut";

const response = await fetch("https://example.com");
console.log(response.statusCode);
```

## Proxy Configuration

```js
const response = await fetch("https://example.com", {
  proxy: {
    host: "your-proxy-server",
    port: 8080,
    auth: "username:password", // Optional
  },
});
```

## Response Object

The `Response` object returned by `h2Alagút` supports the following properties and methods:

- `statusCode`: The HTTP status code.
- `text()`: Returns the response body as a string.
- `json()`: Parses the response body as JSON.
- `arrayBuffer()`: Returns the response body as an `ArrayBuffer`.

## Timeout Handling

You can specify a timeout for the request:

```js
const response = await fetch("https://example.com", {
  timeout: 5000, // Timeout in milliseconds
});
```

## Error Handling

The adapter throws errors for:

- Invalid URLs
- Proxy authentication failures
- Request timeouts
- HTTP/2 negotiation failures

## Example

```js
import { fetch } from "h2alagut";

try {
  const response = await fetch("https://example.com", {
    proxy: {
      host: "proxy.example.com",
      port: 8080,
      auth: "user:pass",
    },
    timeout: 3000,
  });

  console.log(response.status);
  console.log(await response.text());
} catch (error) {
  console.error("Request failed:", error.message);
}
```

## License

MIT
npm package: @jonge/watermark
Description: [![npm version](https://badge.fury.io/js/%40jonge%2Fwatermark.svg)](https://badge.fury.io/js/%40jonge%2Fwatermark)
Author: NoName4Me
Latest version: 1.0.1

# 水印

[![npm version](https://badge.fury.io/js/%40jonge%2Fwatermark.svg)](https://badge.fury.io/js/%40jonge%2Fwatermark)

![](demo.png)

## 使用示例

> browser: `window.Watermark`

```js
import { getWatermark, setWatermark } from '@jonge/watermark';

// 通过方法获取{生成的图片，建议图片大小}
const content = '水印测试1234';
const { backgroundImage, backgroundSize, dataUrl } = getWatermark({ content });
// backgroundImage: url(dataUrl)
// backgroundSize: 10px 20px
// dataUrl: "data:image/png;base64;xxxxxxxx"

// 指定挂载容器，设置水印，并开启防篡改
setWatermark({
  content: 'watermark 1234 水印',
  mountEl: this.refs.el as HTMLElement,
  marginLeft: 120,
  marginTop: 200,
  antiHack: true,
  styles: {
    fontWeight: '200',
    backgroundColor: 'lightyellow'
  },
});
```

## API

- `function getWatermark(config: WatermarkConfig) {}`
- `function getWatermark(config: DomWatermarkConfig) {}`

### `WatermarkConfig` 属性

| 属性名       | 类型   | 说明                           | 是否必填 | 默认值                                     |
| ------------ | ------ | ------------------------------ | -------- | ------------------------------------------ |
| `type`       | string | 水印类型：`svg`，`canvas`      | N        | `canvas`                                   |
| `content`    | string | 水印内容                       | Y        |                                            |
| `rotate`     | number | 旋转角度（顺时针正，逆时针负） | N        | -30                                        |
| `marginTop`  | number | 垂直间距                       | N        | 48                                         |
| `marginLeft` | number | 水平间距                       | N        | 60                                         |
| `color`      | string | 文字颜色                       | N        | `rgba(191, 195, 199, 0.3)`                 |
| `fontSize`   | number | 文字大小                       | N        | `14`                                       |
| `fontFamily` | string | 字体                           | N        | `"PingFang SC,Microsoft YaHei,sans-serif"` |

### `DomWatermarkConfig` 属性

除 `WatermarkConfig` 中的属性外，还有

| 属性名  | 类型            | 说明                                        | 是否必填 | 默认值        |
| ------- | --------------- | ------------------------------------------- | -------- | ------------- |
| styles  | StyleSheet 对象 | 自定义水印字体样式，水印容器 zIndex、背景等 | N        |               |
| mountEl | HTMLElement     | 水印挂载容器                                | N        | document.body |

## 开发者

```shell
# 启动示例
yarn storybook

```
npm package: @jonggrang/vnode
Description: An extensible virtual-dom library written in typescript.
Author: Syaiful Bahri
Latest version: 0.1.1

## @jonggrang/vnode

An extensible virtual-dom library written in typescript.

### Overview

This Virtual DOM library largely useless out of the box. You'll need to bring your own attributes, properties, and event. Though there is a working implementation included. It is intended to extend by other framework or developer to suit their needs.
npm package: @jonghyo/textlint-plugin-asciidoc
Description: textlint plugin for Asciidoc with comment support.
Author: jonghyo
Latest version: 0.1.5

# textlint-plugin-asciidoc

[Asciidoc](https://asciidoc.org/ "Asciidoc") support for [textlint](https://github.com/textlint/textlint "textlint")
using [asciidoctor.js](https://github.com/asciidoctor/asciidoctor.js).

This is inspired by [textlint-plugin-asciidoctor](https://github.com/seikichi/textlint-plugin-asciidoctor "textlint-plugin-asciidoctor") and appended some features;

- Typescript
- asciidoctor.js >= 2.1.0 support
- **Support Asciidoc comment**(e.g. `// foo`)
  - You can use [textlint-filter-rule-comments](https://github.com/textlint/textlint-filter-rule-comments "textlint-filter-rule-comments") with Asciidoc.
- Some syntax support
  - If you find unsupported syntax, please create an issue.

## Installation

```sh
> npm install @jonghyo/textlint-plugin-asciidoc
```

## Usage

```json
{
  "plugins": [
    "@jonghyo/asciidoc"
  ]
}
```

## File Extension

This plugin recognize these file extension as asciidoc file.

- ".adoc"
- ".asciidoc"
- ".asc"

## Tests

```sh
> npm test
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Alternatives

- [azu/textlint-plugin-asciidoc-loose](https://github.com/azu/textlint-plugin-asciidoc-loose)
- [ynitto/textlint-plugin-asciidoc-loose](https://github.com/ynitto/textlint-plugin-asciidoc)
- [textlint-plugin-asciidoctor](https://github.com/seikichi/textlint-plugin-asciidoctor)

## License

MIT
npm package: @jonghyun2/one-login
Description: A reusable login component as a web component
Author: 종현님
Latest version: 1.0.2

# @jonghyun2/one-login

**A reusable login component as a web component** for integrating authentication into multiple services effortlessly.

## Installation

Install the `@jonghyun2/one-login` package from npm:

```bash
npm install @jonghyun2/one-login
```


## Usage
After installing, you can add the <auth-component> directly into your HTML code. Importing the package will automatically register the component globally, making it available throughout your project.


Use <auth-component> directly in your HTML:
```
<auth-component></auth-component>
```

### deploy
```
npm version patch   # 패치 버전 (1.0.0 -> 1.0.1)
npm publish --access=public
```
npm package: @jongleberry/identify
Description: Image identification service with Vips via Sharp support falling back to ImageMagick
Author: Jonathan Ong
Latest version: 1.0.0

# @jongleberry/identify

[![Node.js CI](https://github.com/jonathanong/identify/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/jonathanong/identify/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster+event%3Apush)
[![codecov](https://codecov.io/gh/jonathanong/identify/branch/master/graph/badge.svg?token=5wtDORuxKg)](https://codecov.io/gh/jonathanong/identify)

A tiny image identification service:

- Uses `libvips` via `sharp` if available
- Falls back to ImageMagick
- Errors if neither exist

## API

```js
const IdentifyService = require('@jongleberry/identify')

const identifyService = new IdentifyService({
  // defaults, no need to set these
  sharp: true,
  imagemagick: true, 
})

const filename = 'some-image.png'

try {
  const result = await identifyService.identify(filename)
  // ['imagemagick', {}]
  // ['sharp', {}]

  const metadata = await identifyService.normalize(result)
  // { width, height, ... }
} catch (err) {
  if (identifyService.isNotAnImageError(err)) throw new Error(`${filename} is not an image.`)
  throw err
}
```
npm package: @jongleberry/load-script
Description: Script loader with promise & requestIdleCallback support
Author: Jonathan Ong
Latest version: 1.0.2


# @jongleberry/load-script

[![Build Status](https://travis-ci.org/jonathanong/load-script.svg?branch=master)](https://travis-ci.org/jonathanong/load-script)
[![codecov](https://codecov.io/gh/jonathanong/load-script/branch/master/graph/badge.svg)](https://codecov.io/gh/jonathanong/load-script)

Script loader with:

- `Promise` support
- `requestIdleCallback` support

Installation:

```bash
npm install --save-dev @jongleberry/load-script
```

Example:

```js
import loadScript from '@jongleberry/load-script'

loadScript('https://www.googletagmanager.com/ns.html?id=GTM-XXXX', {
  timeout: 1000
}).catch((err) => {
  console.error(err.stack)
})
```

## API

### const script = await loadScript(src [, options])

- `src` - JS source URL
- `options`:
  - `type`
  - `charset`
  - `id`
  - `noModule`
  - `async`
  - `defer`
  - `timeout` - timeout passed to `requestIdleCallback`, falling back to `setTimeout`. Set to 0 to load JS in at least the next tick.

Returns the script element when it's resolved.
npm package: @jongleberry/passwords
Description: Password creation and validation
Author: Jonathan Ong
Latest version: 1.2.2

# Passwords

[![Node.js CI](https://github.com/jonathanong/passwords/workflows/Node.js%20CI/badge.svg?branch=master)](https://github.com/jonathanong/passwords/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster)
[![codecov](https://codecov.io/gh/jonathanong/passwords/branch/master/graph/badge.svg?token=4me2xcwg7f)](https://codecov.io/gh/jonathanong/passwords)

Personal library for managing passwords.

Features:

- Hash and verify passwords with node.js-native scrypt
- Checks passwords against the [haveibeenpwned](https://haveibeenpwned.com/API/v3#PwnedPasswords) database and disallow pwned passwords
  - Provides a configurable timeout for hitting HIBP
  - Does not handle HIBP retries. Because its APIs are served by CloudFlare, retries are probably unnecessary.
- Configurable minimum password length with a default of 8 characters
- HTTP client-friendly errors with [http-errors](https://www.npmjs.com/package/http-errors)

## API

```js
const Passwords = require('@jongleberry/passwords')

const passwords = new Passwords({
  // options
})

const [key, salt] = await passwords.createPassword('some password')

const isValidPassword = await passwords.comparePassword('some password', key, salt)
```

### Options

- `hibpTimeout = 1000` - timeout to [hibp](https://haveibeenpwned.com/API/v3#PwnedPasswords) in milliseconds. If for some reason hibp takes longer than this timeout, the password will be assumed to be valid.
- `minimumPasswordLength = 8` - minimum password character length
- `saltLength = 16` - salt length in bytes
- `keyLength = 64` - derived key length in bytes
- `scryptOptions = {}` - options passed directly to [scrypt](https://nodejs.org/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback)

NOTE: changing `scryptOptions` will change the derived key, so keep it consistent in your app or store it along with your password.

### [key, salt, scryptOptions] = await createPassword(password)

Create a derived key and salt from a password.

### isValidPassword = await comparePassword(password, key, salt [, scryptOptions])

Validate the password with the derived key and salt. `scryptOptions` is only necessary if it's different than the currently set options.
npm package: @jongleberry/react-star-rating
Description: A simple star rating component built with React.
Author: Cameron J Roe
Latest version: 1.4.6

# react-star-rating ![](https://david-dm.org/cameronjroe/react-star-rating.svg)

[![NPM](https://nodei.co/npm/react-star-rating.png?compact=true)](https://nodei.co/npm/react-star-rating/)

<!-- [![Build Status](https://travis-ci.org/)](https://travis-ci.org/) -->
![](src/assets/star-rating.png)

> A simple star rating component built with React.

## Install

```sh
$ npm install react-star-rating --save
```

Include the css:

```html
<link rel="stylesheet" href="node_modules/react-star-rating/dist/css/react-star-rating.min.css">
```

## Usage

### ES6
```js
import React from 'react';
import StarRating from 'react-star-rating';

class FormComponent extends React.Component {
  render() {
    return (
      <form action="/api" method="POST">
        <StarRating name="airbnb-rating" caption="Rate your stay!" totalStars={5} />
        <button type="submit" className="btn btn-submit">Submit Rating</button>
      </form>
    );
  }
}

React.render(<FormComponent />, document.getElementById('star-rating'));
```

### ES5
```js
var React = require('react');
var StarRating = require('react-star-rating');

var FormComponent = React.createClass({
    render: function () {
      return (
        <form action="/api" method="POST">
          <StarRating name="airbnb-rating" caption="Rate your stay!" totalStars={5} />
          <button type="submit" className="btn btn-submit">Submit Rating</button>
        </form>
      );
    }
});

React.render(<FormComponent />, document.getElementById('star-rating'));
```

## Options
  - **name**={string} - name for form input (required)
  - **caption**={string} - caption for rating (optional)
  - **totalStars**={number} - rating amount (required, default: 5)
  - **rating**={number} - a set rating between the rating amount (optional)
  - **disabled**={boolean} - whether to disable the rating from being selected (optional)
  - **editing**={boolean} - whether the rating is explicitly in editing mode (optional)
  - **size**={number} - size of stars (optional)
  - **onRatingClick**={function} - a handler function that gets called onClick of the rating (optional) - gets passed (event, {position, rating, caption, name})

## Todo

- [x] Fix ES6 bug with bundling
- [x] Add svg stars
- [x] Double-check touch support works
- [ ] Re-implement star hovering (kinda janky right now)


## License

[MIT](https://github.com/cameronjroe/react-star-rating/blob/master/LICENSE)