open-index/open-npm huggingface dataset:
npm package: @nanoauth/base
Description: A lightweight browser-side library for managing OAuth2 flows in a popup
Author: Kitsu Team
Latest version: 0.3.0

# `@nanoauth/base` — The Core of NanoAuth

Provides a set of basic utilities for managing OAuth2 flows in a popup.

You can absolutely use this directly, but if there's a `@nanoauth/` package specific to the site
you want to access, I recommend using that instead. The stuff in this package is pretty low-level.

## Usage

Install NanoAuth as a dependency

```
npm install @nanoauth/base
```

Set up your redirect target. This should be an HTML file which just calls `handleRedirect()`, and it
**must** be served from the same origin as your application.

## `async getAuthorization(url: URL | string): Promise<Record<string, unknown>>`

Opens a popup for an OAuth2 flow and resolves with the resulting data. If the OAuth2 Provider
redirects with an error or the popup fails to open, this will reject.

## `handleRedirect(): void`

_Only used for the redirect target._ Extracts the URL params for both Authorization Code (`?query`)
and Implicit Grant (`#fragment`) redirect responses, and sends them to the originating page with
`postMessage`.

## `generateRandom64(bytes: number): string`

Utility for PKCE support. Uses browser crypto to securely generate a base64-encoded string of random
bytes.

## `Errors`

### `PopupFailed extends Error`

Failed to open a popup. This usually happens due to a popup blocker. Check that you are calling
`getAuthorization` within one second of user interaction (ie, clicking a button)

### `StateMismatch extends Error`

The state parameter received back from the OAuth2 provider wasn't the expected one.

### `OAuth2Error extends Error`

Base class for generic OAuth2 errors.

### `InvalidRequest extends OAuth2Error`

The request is missing a required parameter, includes an invalid parameter value, includes a
parameter more than once, or is otherwise malformed.

### `UnauthorizedClient extends OAuth2Error`

The client is not authorized to request an authorization code using this method.

### `AccessDenied extends OAuth2Error`

The resource owner or authorization server denied the request.

### `UnsupportedResponseType extends OAuth2Error`

The authorization server does not support obtaining an authorization code using this method.

### `InvalidScope extends OAuth2Error`

The requested scope is invalid, unknown, or malformed.

### `ServerError extends OAuth2Error`

The authorization server encountered an unexpected condition that prevented it from fulfilling the
request.

### `TemporarilyUnavailable extends OAuth2Error`

The authorization server is currently unable to handle the request due to a temporary overloading or
maintenance of the server.
npm package: @nanoauth/myanimelist
Description: NanoAuth library for retrieving a MyAnimeList token
Author: Kitsu Team
Latest version: 0.2.3

# `@nanoauth/myanimelist` — Handle MyAnimeList OAuth2 flow

Provides a set of basic utilities for managing OAuth2 flows in a popup.

You can absolutely use this directly, but if there's a `@nanoauth/` package specific to the site
you want to access, I recommend using that instead. The stuff in this package is pretty low-level.

## Usage

Install NanoAuth as a dependency

```
npm install @nanoauth/base
```

Set up your redirect target. This should be an HTML file which just calls `handleRedirect()`, and it
**must** be served from the same origin as your application.

## `async getAuthorization(url: URL | string): Promise<Record<string, unknown>>`

Opens a popup for an OAuth2 flow and resolves with the resulting data. If the OAuth2 Provider
redirects with an error or the popup fails to open, this will reject.

## `handleRedirect(): void`

_Only used for the redirect target._ Extracts the URL params for both Authorization Code (`?query`)
and Implicit Grant (`#fragment`) redirect responses, and sends them to the originating page with
`postMessage`.

## `generateRandom64(bytes: number): string`

Utility for PKCE support. Uses browser crypto to securely generate a base64-encoded string of random
bytes.

## `Errors`

### `PopupFailed extends Error`

Failed to open a popup. This usually happens due to a popup blocker. Check that you are calling
`getAuthorization` within one second of user interaction (ie, clicking a button)

### `StateMismatch extends Error`

The state parameter received back from the OAuth2 provider wasn't the expected one.

### `OAuth2Error extends Error`

Base class for generic OAuth2 errors.

### `InvalidRequest extends OAuth2Error`

The request is missing a required parameter, includes an invalid parameter value, includes a
parameter more than once, or is otherwise malformed.

### `UnauthorizedClient extends OAuth2Error`

The client is not authorized to request an authorization code using this method.

### `AccessDenied extends OAuth2Error`

The resource owner or authorization server denied the request.

### `UnsupportedResponseType extends OAuth2Error`

The authorization server does not support obtaining an authorization code using this method.

### `InvalidScope extends OAuth2Error`

The requested scope is invalid, unknown, or malformed.

### `ServerError extends OAuth2Error`

The authorization server encountered an unexpected condition that prevented it from fulfilling the
request.

### `TemporarilyUnavailable extends OAuth2Error`

The authorization server is currently unable to handle the request due to a temporary overloading or
maintenance of the server.
npm package: @nanobits/react-components
Description: React library that provide atom to molecule lable component that are frequently used
Author: Tinkeshwar
Latest version: 0.0.8

# `nanobits-react-components`

> This is a react components library, design to ease the work in your project.

## Usage

```
import { NButton } from 'nanobits-react-components'

<NButton
    buttonText={'Your text'}
/>

```
npm package: @nanobits/react-fa-icons
Description: Atom label component that provide icon support from fa icons
Author: Tinkeshwar
Latest version: 0.0.5

# `nanobits-react-icons`

> React library to provide fa icon support into your react project

## Usage

```
import Icon from 'nanobits-react-icons'

<Icon icon={'fa-trash'} type={'solid'}/>

```
npm package: @nanobits/react-ui
Description: Atom lable react component based on bootstrap 5 and core ui
Author: Tinkeshwar
Latest version: 0.0.5

# `nanobits-react-ui`

> It a react component library with bootstrap 5 support.

## Usage

```txt
Install bootstrap 5 into your project and import `@import 'bootstrap/dist/css/bootstrap.min.css'` at the top of your css or scss file.
```

```txt
import { Container, Row, Col } from 'nanobits-react-ui'

<Container>
    <Row>
        <Col></Col>
    </Row>
</Container>


use all bootstrap 5 class to design
```
npm package: @nanobot248/linux-dedupe
Description: Provides wrapper methods for FIDEDUPERANGE ioctl on linux, allowing to deduplicate file ranges.
Author: Andreas Hubert
Latest version: 0.1.0

Linux file data deduplication for Node.js
===

Linux VFS provides the `FIDEDUPERANGE` `ioctl` to deduplicate byte ranges in multiple files.
This package provides facilities for calling this `ioctl`.

Usage
---

The package exports the class `Deduplicator`. For now, this class only provides a single method called
`dedupe`, which is able to deduplicate a single byte range in two files.

```typescript
  import * as fs from "fs";
  import { Deduplicator, getStatusInfo } from "@nanobot248/linux-dedupe";

  const fd1 = fs.openSync("/path/to/file1").fd;
  const off1 = 0;
  const len1 = 1024 * 1024;

  const fd2 = fs.openSync("/path/to/file2").fd;
  const off2 = 0;

  const deduplicator = new Deduplicator();
  deduplicator.dedupe(fd1, off1, len1, fd2, off2).then((result) => {
    console.log("result:", result);
    console.log("status: " + getStatusInfo(result.status));
  }).catch((err) => {
    console.error("error:", err);
  });
```