open-index/open-npm huggingface dataset:
npm package: @qrcode-js/node
Description: NodeJs version of the Awesome QR
Author: qrcode-js team
Latest version: 1.2.0

# @qrcode-js/node

## Description

This is a wrapper around the core package, enabling creation of QRs on the server side, on Node environments.

Behind the scenes it uses the `canvas` package to use the canvas like the built-in in browsers.

## Example

```typescript
import QRCodeNode from "@qrcode-js/node";
import fs from "node:fs/promises";

async function main() {
  const myQR = QRCodeNode();
  myQR.setOptions({
    text: "https://github.com/qrcode-js/qrcode",
    color: "#123456",
    size: 1000,
    logo: { round: 0.4, margin: 0 },
    dots: {
      scale: 0.75,
      round: 1,
    },
    finder: {
      round: 0.5,
    },
    gradient: (ctx, size) => {
      const gradient = ctx.createLinearGradient(0, 0, size, 0);
      gradient.addColorStop(0, "green");
      gradient.addColorStop(0.5, "grey");
      gradient.addColorStop(1, "red");
      return gradient;
    },
    drawFunction: "telegram",
    // drawFunction: (
    //   canvasContext,
    //   left,
    //   top,
    //   nSize,
    //   scale,
    //   round,
    //   parameters,
    //   otherCells
    // ) => {
    //   if (parameters.isTiming) {
    //     AwesomeQR._drawDot(canvasContext, left, top, nSize, scale, round);
    //   }
    // },
  });

  await fs.mkdir("dist", { recursive: true });
  await myQR.draw().then((d) => fs.writeFile("dist/qrcode.png", d));
}
main().catch(console.error);
```

## CLI

This package ships with a CLI, a Command Line Interface.

Usage: `npx qrcode [OPTIONS] path/to/output-file`

Options are two, `--help` and `--opt`.

`--help` will show a help message and exit.

`--opt` is used to set individual options for the QR.
Numbers are automatically parsed. To set a nested parameter use the "dot" syntax by Lodash. See example below to better understand.

### Example

```shell
npx qrcode --opt.text="This is a text" --opt.size=1000 --opt.dots.round=0.5 ./qrcode.png
```
npm package: @qrcode-rs/qrcode-android-arm-eabi
Description: This is the **armv7-linux-androideabi** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-android-arm-eabi`

This is the **armv7-linux-androideabi** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-android-arm64
Description: This is the **aarch64-linux-android** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-android-arm64`

This is the **aarch64-linux-android** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-darwin-arm64
Description: This is the **aarch64-apple-darwin** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-darwin-universal
Description: This is the **universal-apple-darwin** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-darwin-universal`

This is the **universal-apple-darwin** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-darwin-x64
Description: This is the **x86_64-apple-darwin** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-freebsd-x64
Description: This is the **x86_64-unknown-freebsd** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-freebsd-x64`

This is the **x86_64-unknown-freebsd** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-linux-arm-gnueabihf
Description: This is the **armv7-unknown-linux-gnueabihf** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-linux-arm-gnueabihf`

This is the **armv7-unknown-linux-gnueabihf** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-linux-arm64-gnu
Description: This is the **aarch64-unknown-linux-gnu** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-linux-arm64-gnu`

This is the **aarch64-unknown-linux-gnu** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-linux-arm64-musl
Description: This is the **aarch64-unknown-linux-musl** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-linux-arm64-musl`

This is the **aarch64-unknown-linux-musl** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-linux-x64-gnu
Description: This is the **x86_64-unknown-linux-gnu** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-linux-x64-musl
Description: This is the **x86_64-unknown-linux-musl** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-linux-x64-musl`

This is the **x86_64-unknown-linux-musl** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-win32-arm64-msvc
Description: This is the **aarch64-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-win32-arm64-msvc`

This is the **aarch64-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-win32-ia32-msvc
Description: This is the **i686-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-win32-ia32-msvc`

This is the **i686-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
npm package: @qrcode-rs/qrcode-win32-x64-msvc
Description: This is the **x86_64-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
Author: Florian Milcendeau
Latest version: 0.0.2

# `@qrcode-rs/qrcode-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@qrcode-rs/qrcode`
npm package: @qrcode/react
Description: Renders QR Codes into a React element
Latest version: 1.0.0-beta.2

# QRCode: React

Renders QR Codes into a React element

## Installation

```sh
npm install --save @qrcode/react
```

## Usage

```js
const QRCode = require('@qrcode/react')

const MyApp = () => (
  <QRCode value='http://example.com' />
)
```

## Props

### `color: string`

Sets the color of the QR Code dark patches. Defaults to `black`.

### `backgroundColor: string`

Sets the color of the QR Code light patches. Defaults to `white`.

Note: you can set this value to `transparent` to not have a background at all.

### `margin: number`

If this prop is set, the resulting image will have additional "points" of the background color on each side.

### `size: number`

If this prop is set, the resulting view will have it's `width` and `height` property set to this value.

### `value: string`

The data to render the QR Code from.
npm package: @qrcode/react-native
Description: Renders QR Codes into a React Native view
Latest version: 1.0.0-beta.2

# QRCode: React Native

Renders QR Codes into a React Native view

## Installation

```sh
npm install --save @qrcode/react-native
```

## Usage

```js
const QRCode = require('@qrcode/react-native')

const MyApp = () => (
  <QRCode value='http://example.com' />
)
```

## Props

### `color: string`

Sets the color of the QR Code dark patches. Defaults to `black`.

### `backgroundColor: string`

Sets the color of the QR Code light patches. Defaults to `white`.

Note: you can set this value to `transparent` to not have a background at all.

### `margin: number`

If this prop is set, the resulting image will have additional "points" of the background color on each side.

### `size: number`

If this prop is set, the resulting view will have it's `width` and `height` property set to this value.

### `value: string`

The data to render the QR Code from.
npm package: @qrcode/svg
Description: Renders QR Codes into SVG strings
Latest version: 1.0.0-beta.2

# QRCode: SVG

Renders QR Codes into SVG strings

## Installation

```sh
npm install --save @qrcode/svg
```

## Usage

```js
const qrcodeSvg = require('@qrcode/svg')

console.log(qrcodeSvg('http://example.com'))
// => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25" shape-rendering="crispEdges"><path stroke="black" ...
```

## API

### `qrcodeSvg(input: string, options?: Options): string`

Renders a QR Code with the data in `input`. Returns a string with the SVG content.

#### `options.color: string`

Sets the color of the QR Code dark patches. Defaults to `black`.

#### `options.backgroundColor: string`

Sets the color of the QR Code light patches. Defaults to `white`.

Note: you can set this value to `transparent` to not have a background at all.

#### `options.margin: number`

If this option is set, the resulting image will have additional "points" of the background color on each side.

#### `options.size: number`

If this option is set, the resulting `svg`-tag will have it's `width` and `height` property set to this value.