open-index/open-npm huggingface dataset:
npm package: @germesdev/qr-image
Description: QR Code generator (png, svg, pdf, eps)
Author: Alexey Ten
Latest version: 3.3.0

qr-image
========

[![npm version](https://badge.fury.io/js/qr-image.svg)](https://badge.fury.io/js/qr-image)

This is yet another QR Code generator.

Overview
--------

  * No dependecies;
  * generate image in `png`, `svg`, `eps` and `pdf` formats;
  * numeric and alphanumeric modes;
  * support UTF-8.

[Releases](https://github.com/alexeyten/qr-image/releases/)


Installing
-----

```shell
npm install qr-image
```

Usage
-----

Example:
```javascript
var qr = require('qr-image');

var qr_svg = qr.image('I love QR!', { type: 'svg' });
qr_svg.pipe(require('fs').createWriteStream('i_love_qr.svg'));

var svg_string = qr.imageSync('I love QR!', { type: 'svg' });
```

Example For generate images in client side:
```javascript in your app.js
var qr = require('qr-image');
router.get('/qr', function(){
  var code = qr.image('http://www.google.com', { type: 'png' });
  res.setHeader('Content-type', 'image/png');  //sent qr image to client side
  code.pipe(res);
});
```
then in the html files:
```
<img src="/qr" alt="qrcode">
```

[More examples](./examples)

`qr = require('qr-image')`

### Methods

  * `qr.image(text, [ec_level | options])` — Readable stream with image data;
  * `qr.imageSync(text, [ec_level | options])` — string with image data. (Buffer for `png`);
  * `qr.svgObject(text, [ec_level | options])` — object with SVG path and size;
  * `qr.matrix(text, [ec_level])` — 2D array.


### Options

  * `text` — text to encode;
  * `ec_level` — error correction level. One of `L`, `M`, `Q`, `H`. Default `M`.
  * `options` — image options object:
    * `ec_level` — default `M`.
    * `type` — image type. Possible values `png` (default), `svg`, `pdf` and `eps`.
    * `size` (png and svg only) — size of one module in pixels. Default `5` for png and `undefined` for svg.
    * `margin` — white space around QR image in modules. Default `4` for `png` and `1` for others.
    * `customize` (only png) — function to customize qr bitmap before encoding to PNG.
    * `parse_url` (experimental, default `false`) — try to optimize QR-code for URLs.

Changes
-------

  * Use `zlib.deflateSync` instead of `pako`.
  * Fix deprecation warning for NodeJS 7.


TODO
----

  * Tests;
  * mixing modes;
  * Kanji (???).
npm package: @germinal-io/eslint-config
Description: ESLint configuration presets
Author: Lucien Boudy
Latest version: 1.4.2

# Germinal ESLint configuration _(@germinal-io/eslint-config)_

> ESLint configuration presets (no semicolon)

## Installation

```console
npm install --save-dev @germinal-io/eslint-config
```

## Usage

edit `eslintrc.json` and add default configuration

```js
{
  "extends": [
    "@germinal-io/eslint-config"
  ]
}
```

**Features :**

- No semicolon !
- `ES` and `TS` validation
- `Prettier` formatting
- `JSX` and `React` syntax validation
- `Jest` tests
npm package: @germinal-io/redux-as-event-bus
Description: `redux-as-event-bus` turns your redux store into a fully-typed event bus.
Author: Germinal
Latest version: 0.1.2


# redux-as-event-bus

`redux-as-event-bus` turns your redux store into a fully-typed event bus.

Doing so it allows you to manage your side effects in a clean and testable way.
  
## Getting started  
  
### Install  
  
``` 
$ npm i redux-as-event-bus  
```  
  
### Create the event bus and add the middleware to your store
  
```typescript  
import { prepareEventBus } from 'redux-as-event-bus'  
import { applyMiddleware, createStore, Store } from 'redux'  
  
type AppEvent = FirstEvent | SecondEvent  
type AppStore = Store<AppState, AppEvent>  
    
const { eventBus, eventBusMiddleware } = prepareEventBus<AppEvent>()  
const store: AppStore = createStore(rootReducer, applyMiddleware(eventBusMiddleware))  
```

### Listen for a specific event
  
```typescript    
eventBus.onEvent('FirstEvent', (event: FirstEvent) => {  
    console.log(event.type) // 'FirstEvent'  
})
```

### Listen for all events
  
```typescript      
eventBus.onAllEvents((event: AppEvent) => {  
    console.log(event.type) // 'FirstEvent' or 'SecondEvent'  
})
```

### Inject dependencies

```typescript
interface Dependencies {  
    getState: () => AppState  
    dispatch: Dispatch<AppEvent>  
    userGateway: UserGateway  
}  
  
const deps: Dependencies = {  
    ...store,  
  userGateway: new GraphQlUserGateway()  
}  
  
eventBus.onEvent('CreateProject', handler(deps))  
  
function handler(deps: Dependencies) {  
    return async (event: CreateProject) => {
        // do async logic using store values, then dispatch new event
        const userId = userIdSelector(deps.getState())  
        const project = prepareProjectToCreate(userId)
        await deps.userGateway.createProject(project)  
        deps.dispatch(ProjectCreated(project))  
    }  
}
```

### Catch handlers execution errors

```typescript
eventBus.onError((error: Error) => { 
    console.log(error) // Some error
})
```

### Access handlers results

```typescript  
type HandlerResult = AppEvent[]

const { eventBus, eventBusMiddleware } = prepareEventBus<
    AppEvent, 
    HandlerResult // to ensure typing
>()

eventBus.onResult((result: HandlerResult) => {
    result.map(store.dispatch) // if results are Event you may dispatch them
})
```

## Licence
MIT
npm package: @germingi/scroll-and-fade-text
Description: Vue3 component which repeatedly scrolls and fades text in a carousel fashion.
Latest version: 1.0.7

# scroll-and-fade-text
Vue3 component which repeatedly scrolls and fades text in a carousel fashion.

[example.webm](https://github.com/germingi/scroll-and-fade-text/assets/22685193/783b7bf5-f950-419b-a12d-6d770af03274)

## Usage 
1. Install the package:
   ```
   npm install @germingi/scroll-and-fade-text
   ```
1. Import the component:
    ```js
    import ScrollAndFadeText from "@germingi/scroll-and-fade-text";
    import "@germingi/scroll-and-fade-text/style.css";
    ```
1. Use the component:
    ```vue
    <ScrollAndFadeText
      text="a really long string that is repeatedly scrolling and fading"
    />
    ```
1. Configure the animation timings (optional):
   ```vue
   <ScrollAndFadeText
      text="a really long string that is repeatedly scrolling and fading"
      :scroll-speed-px-per-s="100"
      :visible-wait-time-ms="1000"
      :invisible-wait-time-ms="1000"
      :fade-time-ms="1000"
    />
   ```

## Demo

To see the component in action without installing it, you can use this repo! Here's what you need to do:
1. Clone this repo using `git clone`.
1. Change directory to the newly cloned repo.
1. Install the required packages with `npm install`.
1. Build the component with `npm run build`.
1. Deploy with `npm run dev`.
1. Check out the component in the browser of your choice! 😎
npm package: @germiniku/stego-js
Description: Steganography, based on frequency domain implemented in JavaScript.
Author: DimensionDev
Latest version: 0.0.5

# Stego-JS

[![npm module](https://img.shields.io/npm/v/@masknet/stego-js)](https://www.npmjs.com/package/@masknet/stego-js)

[Example](https://dimensiondev.github.io/Stego-JS/example/index.html)

## Installation

```bash
# node
npm install @masknet/stego-js @napi-rs/image --global

# dom
npm install @masknet/stego-js
```

## Usage

```bash
# cli
npx @masknet/stego-js -h

# or
npm install --global @masknet/stego-js
stego-js -h
```

```javascript
// node
import { encode, decode } from '@masknet/stego-js/cjs/node'

// dom
import { encode, decode } from '@masknet/stego-js/cjs/dom'

// in native  (using ./cjs/node)
// in browser (using ./cjs/dom)
import { encode, decode } from '@masknet/stego-js'
```

## Refs

- [Javascript implementation of Java’s String.hashCode() method](https://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/)
- [Shuffle & Unshuffle an Array in JavaScript](https://gist.github.com/iSWORD/13f715370e56703f6c973b6dd706bbbd)
- [RGB to YCbCr](https://makarandtapaswi.wordpress.com/2009/07/20/why-the-rgb-to-ycbcr/)
- [YCbCr to RGB](https://stackoverflow.com/questions/21264648/javascript-convert-yuv-to-rgb)