open-index/open-npm huggingface dataset:
npm package: @libsx/cola
Description: Libsx致力于提供小巧、高效、安全、易用的前端开发工具库（colajs）
Author: dbxiao
Latest version: 0.1.0

# Libsx

Libsx致力于提供小巧、高效、安全、易用的前端开发工具库（colajs）

## 产品

### Broadcast

广播库，使用JS ES6原生开发，无第三方依赖，无框架限制。

[🚀立即查看]('//www.libsx.com')


## GitHub

https://github.com/dbxiao/libsx
npm package: @libsx/libs
Description: [![NPM version](https://img.shields.io/npm/v/libsx.svg?style=flat)](https://npmjs.org/package/libsx) [![NPM downloads](http://img.shields.io/npm/dm/libsx.svg?style=flat)](https://npmjs.org/package/libsx)
Author: dbxiao
Latest version: 0.0.2

# libsx

[![NPM version](https://img.shields.io/npm/v/libsx.svg?style=flat)](https://npmjs.org/package/libsx)
[![NPM downloads](http://img.shields.io/npm/dm/libsx.svg?style=flat)](https://npmjs.org/package/libsx)

A react library developed with dumi

## Usage

TODO

## Options

TODO

## Development

```bash
# install dependencies
$ pnpm install

# develop library by docs demo
$ pnpm start

# build library source code
$ pnpm run build

# build library source code in watch mode
$ pnpm run build:watch

# build docs
$ pnpm run docs:build

# check your project for potential problems
$ pnpm run doctor
```

## LICENSE

MIT
npm package: @libtelegram/anti-flood
Description: AntiFlood middleware for LibTelegram
Author: martiliones
Latest version: 0.1.0

# anti-flood [![Coverage Status](https://img.shields.io/static/v1?label=chat&message=on%20Telegram&logo=telegram&color=blue)](https://t.me/libtelegram_chat)

LibTelegram AntiFlood middleware

[Learn about the hitting limits in Telegram Bots API](https://core.telegram.org/bots/faq#broadcasting-to-users).

## Installation
You can install this package by the following command.

```
npm install @libtelegram/anti-flood
```

## API
```js
const antiFlood = require('@libtelegram/anti-flood');
```

The `antiFlood` object exposes various factories to create middlewares 

### antiFlood.omission(options[, callback])
The `omission` function skips the message if the time elapsed since the previous message is less than a `delay` 

```js
function callback(usr, msg) {
  usr.reply('Too many messages');
}

bot.use(antiFlood.omission({ delay: 1 / 2 }, callback));
```
#### options
The `omission` function takes an `options` object that may contain any of the following keys:

##### delay
The minimum time interval between messages in seconds

Defaults to `0.5`.
#### callback
Callback to be called after too many messages are detected

`callback` has a signature of `(usr, msg)`.

### antiFlood.penalty(options[, callback])
```js
function callback(usr, msg) {
  usr.reply('You won\'t be able to use the bot for 2 minutes');
}

bot.use(antiFlood.penalty({
  maxAttempts: 3,
  timeLimit: 2,
  timeBlocked: 2 * 60,
}, callback));
```

#### options
The `penalty` function takes an `options` object that may contain any of the following keys:

##### maxAttempts
The maximum number of requests from a user for a given time limit. After exceeding the number of attempts, the bot will not respond to user messages 

Defaults to `5`.
##### timeLimit
The time in seconds during which the counter of attempts is added. 

Defaults to `2`.
##### timeBlocked
The time in seconds for which the user will be blocked 

Defaults to `60`.
#### callback
Callback to be called after user is blocked

`callback` has a signature of `(usr, msg)`.

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @libtelegram/helpers
Description: AntiFlood middleware for LibTelegram
Author: martiliones
Latest version: 0.1.0

# anti-flood [![Coverage Status](https://img.shields.io/static/v1?label=chat&message=on%20Telegram&logo=telegram&color=blue)](https://t.me/libtelegram_chat)

LibTelegram AntiFlood middleware

[Learn about the hitting limits in Telegram Bots API](https://core.telegram.org/bots/faq#broadcasting-to-users).

## Installation
You can install this package by the following command.

```
npm install @libtelegram/anti-flood
```

## API
```js
const antiFlood = require('@libtelegram/anti-flood');
```

The `antiFlood` object exposes various factories to create middlewares 

### antiFlood.omission(options[, callback])
The `omission` function skips the message if the time elapsed since the previous message is less than a `delay` 

```js
function callback(usr, msg) {
  usr.reply('Too many messages');
}

bot.use(antiFlood.omission({ delay: 1 / 2 }, callback));
```
#### options
The `omission` function takes an `options` object that may contain any of the following keys:

##### delay
The minimum time interval between messages in seconds

Defaults to `0.5`.
#### callback
Callback to be called after too many messages are detected

`callback` has a signature of `(usr, msg)`.

### antiFlood.penalty(options[, callback])
```js
function callback(usr, msg) {
  usr.reply('You won\'t be able to use the bot for 2 minutes');
}

bot.use(antiFlood.penalty({
  maxAttempts: 3,
  timeLimit: 2,
  timeBlocked: 2 * 60,
}, callback));
```

#### options
The `penalty` function takes an `options` object that may contain any of the following keys:

##### maxAttempts
The maximum number of requests from a user for a given time limit. After exceeding the number of attempts, the bot will not respond to user messages 

Defaults to `5`.
##### timeLimit
The time in seconds during which the counter of attempts is added. 

Defaults to `2`.
##### timeBlocked
The time in seconds for which the user will be blocked 

Defaults to `60`.
#### callback
Callback to be called after user is blocked

`callback` has a signature of `(usr, msg)`.

## License

[MIT](http://opensource.org/licenses/MIT)
npm package: @libton/share
Description: shared logic for libton
Latest version: 0.12.6

# @libton/share

[![NPM version](https://badgen.net/npm/v/@libton/share)](https://npmjs.com/package/@libton/share)
[![NPM downloads](https://badgen.net/npm/dm/@libton/share)](https://npmjs.com/package/@libton/share)

shared logic for libton

## Install

```bash
yarn add @libton/share
```

## Usage

```js
import { getCliName, getFilename, getName } from '@libton/share';

getCliName('@libton/share'); // libton-share
getFilename('@libton/share'); // libton-share
getName('@libton/share'); // LibtonShare
```
npm package: @libusoftcicom/pdf417-generator
Description: PDF417 HUB3 2D barcode generator for browser and Node
Author: Petar Koretic
Latest version: 1.0.2

## PDF417 HUB3 Barcode Generator

This library provides you with the ability to generate PDF417 HUB3 Barcodes in browser or Node.js
apps. The final barcode is drawn into a canvas element and can be used for many different use cases.
The code is based on the [bcmath-js](https://sourceforge.net/projects/bcmath-js) and
[pdf417-js](https://github.com/bkuzmic/pdf417-js).


### Browser

You can find a complete example at [examples/browser](examples/browser) and a running demo [here](https://pkoretic.github.io/pdf417-generator).

The usage is as simple as providing a canvas element and a text that should be used for barcode generation:

```
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/libbcmath.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/bcmath.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/pkoretic/pdf417-generator@master/lib/pdf417.js" type="text/javascript"></script>

```

**HTML**
```
<canvas id="barcode" ></canvas>
```

**JS**
```
var code = "HRVHUB30\nHRK\n" +
"000000000012355\n"+
"PETAR KORETIĆ\n"+
"PREVOJ DD\n"+
"10000 Zagreb\n"+
"pkoretic J.D.O.O\n"+
"PREVOJ DD\n"+
"10000 ZAGREB\n"+
"HR5041240000000000\n"+
"HR01\n"+
"7336-68949637625-00001\n"+
"COST\n"+
"Uplata za 1. mjesec\n";

var canvas = document.getElementById("barcode")
PDF417.draw(code, canvas)

```

### Node.js

You can find a complete example at [examples/node](examples/node).

The [node-canvas](https://github.com/Automattic/node-canvas) library is used for drawing.

Install the library:

```
npm install pdf417-generator
```

Use it as:

```
const Canvas = require("canvas")
const PDF417 = require("pdf417-generator")

const code =
`HRVHUB30
HRK
000000000012355
PETAR KORETIĆ
PREVOJ DD
10000 Zagreb
FIRMA J.D.O.O
PREVOJ DD
10000 ZAGREB
HR5041240000000000
HR01
7336-68949637625-00001
COST
Uplata za 1. mjesec`

let canvas = new Canvas()
PDF417.draw(code, canvas)

// create an image which can be sent in an e-mail or similar
console.log(`<img src="${canvas.toDataURL()}" />`)
```


### TypeScript
```
import * as PDF417 from 'pdf417-generator';


PDF417.draw(code, canvas);
```


### draw arguments

**code** - (string) code to represent using PDF417
**canvas** - (Canvas) Canvas instance
**aspectRatio** - (float) the width to height of the symbol (excluding quiet zones); default 2
**ecl** - (int) error correction level (0-8); default -1 = automatic correction level
**devicePixelRatio** (int) determine how much extra pixel density should be added to allow for a sharper image; default window.devicePixelRatio if available