open-index/open-npm huggingface dataset:
npm package: @jmnribeiro/oauth2-cli-helper
Description: A small helper CLI to create oauth2 tokens using a built-in server
Author: jroehl
Latest version: 0.0.5

# oauth2-cli-helper

A small helper CLI to create oauth2 tokens programmatically

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/oauth2-cli-helper.svg)](https://npmjs.org/package/oauth2-cli-helper)
[![Downloads/week](https://img.shields.io/npm/dw/oauth2-cli-helper.svg)](https://npmjs.org/package/oauth2-cli-helper)
[![License](https://img.shields.io/npm/l/oauth2-cli-helper.svg)](https://github.com/jroehl/oauth2-cli-helper/blob/master/package.json)

## Description

Use this cli to generate a oauth2 access token for various APIs.

You need to have an app set up with the redirect (callback) URL pointing to
"http://localhost:3000/callback" (or the specified custom redirect URL).

## Usage

### Example for Linkedin

```bash
$ oauth2-cli-helper --client_id=<client_id> \
    --client_secret=<client_secret> \
    --authorization_uri=https://www.linkedin.com/oauth/v2/authorization \
    --token_uri=https://www.linkedin.com/oauth/v2/accessToken \
    --scope=r_liteprofile --scope=r_emailaddress --scope=w_member_social
```

### Example for Withings

```bash
$ oauth2-cli-helper --client_id=<client_id> \
    --client_secret=<client_secret> \
    --authorization_uri=https://account.withings.com/oauth2_user/authorize2 \
    --token_uri=https://account.withings.com/oauth2/token \
    --token_method=POST --token_in_body \
    --scope=user.info
```

## Options

```bash
  -V, --version                              show CLI version
  -a, --authorization_uri=authorization_uri  (required) the uri used for authorization
  -d, --delimiter=delimiter                  [default:  ] delimiter to concatenate the scopes
  -e, --state=state                          [default: 1576475685455] state of the request
  -g, --grant_type=grant_type                [default: authorization_code] the authorization code grant type
  -h, --help                                 show CLI help
  -i, --client_id=client_id                  (required) client id of the app
  -m, --token_method=token_method            [default: GET] the method used to fetch the token
  -n, --timeout=timeout                      [default: 30] the time in seconds to listen for a request on the callback uri
  -o, --scope=scope                          [default: ] scope of the permissions
  -p, --token_in_body                        if the params should be send in body in token request
  -r, --redirect_uri=redirect_uri            [default: http://localhost:3000/callback] redirect (callback) uri
  -s, --client_secret=client_secret          (required) client secret of the app
  -t, --token_uri=token_uri                  (required) the uri used to request a token
  -v, --verbose
```
npm package: @jmnuf/results
Description: A typescript error or value discriminator
Author: JM
Latest version: 1.1.0

# Results
Some wrapper around values/function calls for distinguishing between values and errors in typescript with a discriminator type. If ok is true then we got a value, but if ok is false we got an error, simple enough.

Result from a synchronous function call
```ts
import { Res, type Result } from "@jmnuf/results";

const result: Result<number> = Res.syncCall(() => {
	// Some code that may error
	const num = Math.random();
	if (num > 0.5) {
		throw new Error("Number is too big");
	}
	return num;
});

if (result.ok) {
	console.log(result.value); // value exists as a number here
} else {
	console.error(result.error); // error exists as an Error instance
}
```

Result from an asynchronous function call
```ts
import { Res, type Result } from "@jmnuf/results";

async function myAsyncOperation() {
	/*
	 * do some async operation that may throw an error
	 */
}

async function myAsyncFn() {
	const result = Res.asyncCall(() => myAsyncOperation());
	if (result.ok) {
		console.log("Operation succesful");
	} else {
		console.log("Operation failed");
	}
}
```

Writing your own resulting function
```ts
import { Res, type Result } from "@jmnuf/results";

function myResultingFn() {
	const value = Math.floor(Math.random() * 100);
	if (value < 70) {
		return Res.Err("Percentage is too low");
	}
	return Res.Ok(value);
}

const result = myResultingFn();
if (result.ok) {
	console.log("Passing with a score of", result.value); // Result value is now a number
} else {
	console.log("Failing score");
}
```
npm package: @jmnuf/wuonix
Description: A relatively simple typescript library for creating signals. Signals are cool and this library is just for managing non-complexly built state in a relatively straight-forward fashion.
Author: JM
Latest version: 1.0.3

# wuonix

## Simple Signals

A relatively simple typescript library for creating signals. Signals are cool and this library is just for managing non-complexly built state in a relatively straight-forward fashion.

There is a base value signal for keeping track of a value and also you can get a computed signal derived from a base value signal that will get re-computed whenever the base value signal is updated.

Maybe in the future creating a computed signal based on multiple signals will be included, undecided as of now.

Usage:

```ts
import { createSignal } from "@jmnuf/wuonix";

const baseValue = "Hello, World!";
const baseText = createSignal(baseValue);
const lowercaseText = signal.computed((text) => text.toLowerCase());


console.log("baseText.value === baseValue ?", baseText.value === baseValue);
console.log("lowercaseText.value === baseValue.toLowerCase() ?", lowercaseText.value === baseValue.toLowerCase());

baseText.listen(({ prv, cur }) => {
  console.log("Value changed from", prv, "to", cur);
});

baseText(() => "Hi Mom!");
```

## Develop

Install dependencies:

```terminal
$ bun install
```

Build project:

```terminal
$ bun run build
```

Run tests:

```terminal
$ bun run tests
```

or

```terminal
$ bun test
```

This project was created using `bun init` in bun v1.2.4. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
npm package: @jmodifier/builds
Description: Object manipulation & more..
Author: JeremyJaydan
Latest version: 0.1.1

The following documentation is automatically generated. Please refer to the development repository ([jModifier/jModifier](https://github.com/jModifier/jModifier)) for information on what jModifier is and how to contribute.<br><br>
# CONTENTS

<br>

- [`jModifier.ping(<ping>)`](#ping) - dummy function

<br><br>
# API 

<br>

## `.ping`

> <OBJECT>
dummy function

`jModifier.ping(<ping>)`

**Returns:**
- `any` - Returns what you send it
<table><thead><tr><th>Parameter</th><th>Type</th><th>Description</th><th>Default</th></tr></thead><tbody><tr><td><code>&lt;ping&gt;</code></td><td><code>any</code></td><td>Send it anything!</td><td><code>undefined</code></td></tr></tbody></table>

> </OBJECT>


### Examples: 
<table><tbody><tr></tr><tr><td>
<p></p><code>Return "hello, world"</code>

```js
jModifier.ping("hello, world");
```
</tr></td><tr><td><code><small>OUTPUT</small></code><b>

```js
"hello, world"
```
</b></td></tr></tbody></table>

<details><summary>source</summary>

<br><small>**Authors of** <code>jModifier/ping.js</code></small><pre><a href="https://www.github.com/JeremyJaydan" title="JeremyJaydan"><img src="https://www.github.com/JeremyJaydan.png" alt="JeremyJaydan" width=48></a></pre>

<p></p><a href="https://github.com/jModifier/jModifier/blob/master/jModifier/ping.js"><code>jModifier/ping.js</code></a>


```js
moule.exports = ping => ping;
```
</details>


---
<br>
npm package: @jmodule/plugin-webpack
Description: 模块化工程构建 Webpack 插件
Author: feirpri
Latest version: 0.4.11

代码编译插件，用于输入资源元数据文件、集成开发调试，以及一些其它可选的特性。

## 安装
```bash
npm i @jmodule/plugin-webpack -D
```

## 配置
```javascript
// webpack.conf.js
const JModulePlugin = require('@jmodule/plugin-webpack');

module.exports = {
    ...others,
    plugins: [
        new WebpackJmodulePlugin({}),
    ],
}
```
使用参考：[快速开始](https://jmodule.jd.com/guide/快速开始.html)

配置项参考：[快速开始](https://jmodule.jd.com/resource/plugin-webpack/%E9%85%8D%E7%BD%AE%E9%A1%B9.html)

插件参数可以单独放在项目根目录中，通过 .jmodule.conf.js 文件进行配置，仅在插件参数为空时读取该文件。
npm package: @jmondi/date-duration
Description: Manage and computing end times based on specified durations.
Author: Jason Raimondi
Latest version: 0.1.1

# DateDuration

## Install (npm)

```bash
pnpm add @jmondi/date-duration
```

### Deno

```ts
import { DateDuration } from "https://deno.land/x/date_duration";
```
npm package: @jmondi/electron-window
Description: Electron window wrapper
Author: Jason Raimondi
Latest version: 1.0.4

# @jmondi/electron-window

Electron window wrapper

## Install

```bash
npm install @jmondi/electron-window
```

## Usage

```typescript
import { app } from "electron";
import { join } from "path";
import { WindowManager } from "@jmondi/electron-window";

const mainWindowUrl = `file://${join(__dirname, "../../index.html")}`;
const windowManager = new WindowManager(mainWindowUrl);

const isMac = process.platform === "darwin";

export async function openMainWindow() {
  await windowManager.createWindow();
}

export function reloadAllWindows() {
  windowManager.reloadAll();
}

async function bootstrap() {
  await app.whenReady();
  await openMainWindow();

  app.on("activate", () => {
    // On OS X it"s common to re-create a window in the app when the
    // dock icon is clicked and there are no other windows open.
    if (isMac) {
      windowManager.focusOrCreate();
    }
  });

  app.on("window-all-closed", () => {
    // On OS X it is common for applications and their menu bar
    // to stay active until the user quits explicitly with Cmd + Q
    if (!isMac) {
      app.quit();
    }
  });
}

bootstrap().catch(console.log);
```
npm package: @jmondi/github-ui
Description: A React component library for displaying GitHub contributors and sponsors with a modern UI.
Latest version: 1.0.1

# @jmondi/github-ui

A React component library for displaying GitHub contributors and sponsors with a modern UI.

## Features

- Display GitHub repository contributors
- Show GitHub sponsors for a user
- Responsive and customizable UI
- Built with React and Tailwind CSS
- Efficient data fetching with SWR

## Installation

```bash
npm install @jmondi/github-ui
# or
yarn add @jmondi/github-ui
# or
pnpm add @jmondi/github-ui
```

## Usage

### Contributors Component

```jsx
import { Contributors } from '@jmondi/github-ui/contributors';
import '@jmondi/github-ui/style.css';

function MyComponent() {
  return (
    <Contributors
      owner="facebook"
      repo="react"
      refreshInterval={3600000} // Optional: 1 hour in milliseconds
    />
  );
}
```

### Sponsors Component

```jsx
import { Sponsors } from '@jmondi/github-ui/sponsors';
import '@jmondi/github-ui/style.css';

function MyComponent() {
  return (
    <Sponsors
      username="octocat"
      refreshInterval={3600000} // Optional: 1 hour in milliseconds
    />
  );
}
```

## API

### Contributors Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| owner | string | - | GitHub repository owner |
| repo | string | - | GitHub repository name |
| refreshInterval | number | 3600000 | Data refresh interval in milliseconds |

### Sponsors Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| username | string | - | GitHub username |
| refreshInterval | number | 3600000 | Data refresh interval in milliseconds |

## Development

1. Clone the repository
2. Install dependencies: `pnpm install`
3. Build the project: `pnpm build`
4. Format code: `pnpm format`

## License

MIT

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Would you like me to explain or elaborate on any part of this README?
npm package: @jmondi/http-err
Description: HttpErrors with status codes and context
Author: Jason Raimondi
Latest version: 0.2.1

# @jmondi/http-err

Common http errors with status codes.

## Install

```bash
pnpm add @jmondi/http-err
```

## Usage

```typescript
import { NotFoundError } from "@jmondi/http-err";

const id = "non-existant-id";

try {
  database.users.findBy(id);
} catch (e) {
  throw new NotFoundError(`[${id}] not found`);
}
```

```typescript
import express from "express";
import { HttpError } from "@jmondi/http-err";

async function handleErrors(err, req, res, next) {
  if (err instanceof InternalServerError) {
    // Do something specific for InternalServerErrors
    // like logging to an exception handling service
  } else if (err instanceof HttpError) {
    return res.status(err.status).json({
      message: err.message,
      context: JSON.stringify(err.context),
    });
  }
  next(err);
}

app = express();
app.get("/api", apiRoutes);
app.use(handleErrors);
```
npm package: @jmondi/http-status
Description: Http status codes
Author: Jason Raimondi
Latest version: 0.1.0

# @jmondi/http-status

Common http status codes.

## Install

```bash
pnpm add @jmondi/http-status
```

## Usage

```typescript
import express from "express";
import { HttpStatus } from "@jmondi/http-status";

app = express();
app.get("/api", (req, res) => {
  res.status(HttpStatus.NO_CONTENT).end();
});
...
```
npm package: @jmondi/mobile-first
Description: PostCSS
Author: Jason Raimondi
Latest version: 1.0.3

# @jmondi/mobile-first

Generates mobile first media queries for the [postcss-custom-media plugin](https://github.com/postcss/postcss-custom-media).

## Install

```bash
pnpm add @jmondi/mobile-first
```

## Usage 

An object with keys of strings, and values of the breakpoint. With the following input:

```javascript
const { generateMediaQueries } = require('@jmondi/mobile-first');

const result = generateMediaQueries({
  phone: 400,
  tablet: 800,
  desktop: 1200,
});

console.log(result);

// {
//   '--phone': `(min-width: 400px)`,
//   '--phone-only': `(min-width: 400px) and (max-width: 799px)`,
//   '--tablet': `(min-width: 800px)`,
//   '--tablet-only': `(min-width: 800px) and (max-width: 1399px)`,
//   '--desktop': `(min-width: 1400px)`,
//   '--desktop-only': `(min-width: 1400px)`,
// }
```

Which then you can use:

```javascript
// postcss.config.js

const { generateMediaQueries } = require('@jmondi/mobile-first');

module.exports = {
    plugins: {
        'postcss-custom-media': {
            importFrom: [{
                customMedia: {
                    '--light': '(prefers-color-scheme: light)',
                    '--dark': '(prefers-color-scheme: dark)',
                    ...generateMediaQueries({
                        phone: 400,
                        tablet: 800,
                        desktop: 1200,
                    }),
                },
            }],
        },
    },
};
```

Then in your css files

```postcss
@media (--phone) {
  html { background-color: teal; }
}
@media (--phone-only) {
  html { color: white; }
}
@media (--tablet) {
  html { background-color: tomato; }
}
@media (--tablet-only) {
  html { color: black; }
}
@media (--desktop) {
  html { background-color: purple; }
}
```

Will output 

```css
@media (min-width: 400px) {
  html { background-color: teal; }
}
@media (min-width: 400px) and (max-width: 799px) {
  html { color: white; }
}
@media (min-width: 800px) {
  html { background-color: tomato; }
}
@media (min-width: 800px) and (max-width: 1399px) {
  html { color: black; }
}
@media (min-width: 1400px) {
  html { background-color: purple; }
}
```
npm package: @jmondi/notify-svelte
Description: Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
Latest version: 0.0.5

# create-svelte

Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).

Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.

## Building

To build your library:

```bash
npm run package
```

To create a production version of your showcase app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

## Publishing

Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).

To publish your library to [npm](https://www.npmjs.com):

```bash
npm publish
```
npm package: @jmondi/route-strings
Description: Manage and create typed route strings for your applications.
Author: Jason Raimondi
Latest version: 3.0.3

# @jmondi/route-strings

[![Deno Version](https://shield.deno.dev/x/route_strings?style=flat-square)](https://deno.land/x/route_strings)
[![Npmjs.org Version](https://img.shields.io/npm/v/@jmondi/route-strings?style=flat-square)](https://www.npmjs.com/package/@jmondi/route-strings)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/jasonraimondi/route-strings/test.yml?branch=main&label=Unit%20Tests&style=flat-square)](https://github.com/jasonraimondi/route-strings)
[![Test Coverage](https://img.shields.io/codeclimate/coverage/jasonraimondi/route-strings?style=flat-square)](https://codeclimate.com/github/jasonraimondi/route-strings)
[![NPM Downloads](https://img.shields.io/npm/dt/@jmondi/route-strings?label=npm%20downloads&style=flat-square)](https://www.npmjs.com/package/@jmondi/route-strings)

A typed route string generator to help keep urls under control.

## Install

```bash
pnpm add @jmondi/route-strings
```

### Deno

```ts
import { route } from "https://deno.land/x/route_strings/mod.ts";
```

## Usage

```ts
import { Route } from "@jmondi/route-strings";
const r = route("/posts/:slug");
r.template;
// /posts/:slug
```

```ts
const r = route("/posts/:slug/random/:id");
r.create({ slug: "hello", id: 5 });
// /posts/hello/random/5
```

```ts
const g = routeGroup({ prefix: "/api/v1" });
const route = g.add("/posts/:slug/random/:id");
route.template;
// /api/v1/posts/:slug/random/:id
route.create({ slug: "hello", id: 5 });
// /api/v1/posts/hello/random/5
```
npm package: @jmondi/tsconfig
Description: An opinionated TypeScript config preset for strict and standardized development. Configs for both Node.js and browser environments.
Author: Jason Raimondi
Latest version: 0.2.0

# @jmondi/tsconfig

An opinionated TypeScript config preset for strict and standardized development. Configs for both Node.js and browser environments.

## Install

```bash
pnpm add @jmondi/tsconfig
```

## Usage


### Node.js

```json5
{
  "extends": "@jmondi/tsconfig",
  "compilerOptions": {
    /* add your own options */
  },
}
```

### Browser

```json5
{
  "extends": "@jmondi/tsconfig/browser",
  "compilerOptions": {
    /* add your own options */
  },
}
```

### Extra Config

```json5
{
  "extends": ["@jmondi/tsconfig", "@jmondi/tsconfig/extra-strict"],
  "compilerOptions": {
    /* add your own options */
  },
}
```