open-index/open-npm huggingface dataset:
npm package: @ssts/color
Description: Create random colors: RGB, HEX or HSL.
Author: Senior Sedo
Latest version: 1.0.0

# Create random colors: RGB, HEX or HSL

One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `color` | **RGB,** **HEX** or **HSL** 😍

## Install
```shell
npm i @ssts/color
```
## Import
```js
import seniorCOLOR from "@ssts/color";
```
## Use
```ts
const randomColor: string = seniorCOLOR();
```

## Arguments
> Returns a string

| Order |  Parameter  |           Type           | Default  |
| :---: | :---------: | :----------------------: | :------: |
|   1   |   method    |  "RGB" \| "HEX" \| "HSL" |  "HEX"   |
|   2   |   opacity   |          number          | optional |

## Examples

```ts
import seniorCOLOR from "@ssts/color";

console.log(seniorCOLOR());         // '#25ECAD'
console.log(seniorCOLOR());         // '#EF0FFA'
console.log(seniorCOLOR("HEX"));    // '#0C4DC0'
console.log(seniorCOLOR("RGB"));    // 'rgb(76, 69, 197)'
console.log(seniorCOLOR("RGB"));    // 'rgb(64, 247, 71)'
console.log(seniorCOLOR("RGB"));    // 'rgb(254, 78, 233)'
console.log(seniorCOLOR("HSL"));    // 'hsl(45, 100%, 50%)'
console.log(seniorCOLOR("HSL"));    // 'hsl(251, 100%, 50%)'
console.log(seniorCOLOR("HSL"));    // 'hsl(160, 100%, 50%)'

// With opacity
console.log(seniorCOLOR("HEX", 0.5));     // '#14B30680'
console.log(seniorCOLOR("RGB", 0.65));    // 'rgba(10, 220, 231, 0.65)'
console.log(seniorCOLOR("HSL", 0.7));     // 'hsla(284, 100%, 50%, 0.7)'

```

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/rand-color~~
>>> `@ssts/color` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/email
Description: Validate an email => true | false.
Author: Senior Sedo
Latest version: 1.0.0

# Validate an email => true | false

One **straight** *forward* `email` validator ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>boolean</sub> 😍

## Install
```shell
npm i @ssts/email
```
## Import
```js
import seniorEMAIL from "@ssts/email";
```
## Use
```ts
const isEmail: boolean = seniorEMAIL("example@test.com");
```

## Arguments
> Returns a boolean

| Order | Parameter |  Type  | Default  |
| :---: | :-------: | :----: | :------: |
|   1   |   email   | string | required |

## Examples

```ts
import seniorEMAIL from "@ssts/email";

console.log(seniorEMAIL("example@gmail.com"));          // true
console.log(seniorEMAIL("user123@yahoo.com"));          // true
console.log(seniorEMAIL("valid.email@domain.com"));     // true
console.log(seniorEMAIL("contact@mydomain.org"));       // true
console.log(seniorEMAIL("info@business.info"));         // true

console.log(seniorEMAIL(""));                           // false
console.log(seniorEMAIL("abc"));                        // false
console.log(seniorEMAIL("user@.com"));                  // false
console.log(seniorEMAIL("user@@domain.com"));           // false
console.log(seniorEMAIL("&user@email.com"));            // false
console.log(seniorEMAIL("can----t@gmail.com"));         // false
console.log(seniorEMAIL("user@gmail..com"));            // false
```

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/is-email~~
>>> `@ssts/email` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/frac
Description: Get a random fractional/decimal number within a range, between two numbers min and max.
Author: Senior Sedo
Latest version: 1.0.0

# Get a random fractional/decimal number within a range, between two numbers min and max

One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `fractional/decimal number` between **min** and **max** numbers 😍

## Install
```shell
npm i @ssts/frac
```
## Import
```js
import seniorFRAC from "@ssts/frac";
```
## Use
```ts
const randomDecimal: number = seniorFRAC(-10, 10);
```

## Arguments
> Returns a number

| Order |   Parameter    |   Type   | Default  |
| :---: | :------------: | :------: | :------: |
|   1   |      min       |  number  | required |
|   2   |      max       |  number  | required |
|   3   | fractionDigits |  number  |    3     |


## Examples

```ts
import seniorFRAC from "@ssts/frac";

console.log(seniorFRAC(0, 10));               // 9.315
console.log(seniorFRAC(0, 100));              // 75.565
console.log(seniorFRAC(0, 100, 3));           // 50.177
console.log(seniorFRAC(0, 100, 3));           // 8.158
console.log(seniorFRAC(0, 100, 2));           // 39.63
console.log(seniorFRAC(0, 100, 1));           // 89.1
console.log(seniorFRAC(0, 100, 7));           // 63.2172386
console.log(seniorFRAC(0, 100, 15));          // 30.750550145460352
console.log(seniorFRAC(-100, 100));           // 88.428
console.log(seniorFRAC(-100, 100));           // -66.316
console.log(seniorFRAC(15, 222));             // 152.743
console.log(seniorFRAC(-1000, 1234567, 6));   // 604889.416455

// Here a trailing zero got truncated, 1206725.172180
console.log(seniorFRAC(-1000, 1234567, 6));   // 1206725.17218
```

## Note
> Sometimes there will be truncating trailing zeros.

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/rand-frac~~
>>> `@ssts/frac` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/id
Description: Create unique random string IDs
Author: Senior Sedo
Latest version: 1.0.0

# Create unique random string IDs

One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `ID` 😍

## Install
```shell
npm i @ssts/id
```
## Import
```js
import seniorID from "@ssts/id";
```
## Use
```ts
const randomId: string = seniorID();
```

## Examples

```js
import seniorID from "@ssts/id";

console.log(seniorID());                           // 'F5vvaP9D-4e5q-CTow-eUsx-P91RH0pph5Gy'
console.log(seniorID([8]));                        // 'ZILHou6J'
console.log(seniorID([8], "love"));                // 'lllloove'
console.log(seniorID([8], "love"));                // 'velvovvo'
console.log(seniorID([8], "love"));                // 'veoelole'
console.log(seniorID([4], "love"));                // 'lvel'
console.log(seniorID([8, 4]));                     // 'ChOUDIc-4fEf'
console.log(seniorID([8, 4, 4]));                  // 'FHF842Qz-YwMf-clAz'
console.log(seniorID([8, 4, 2]));                  // 'VidKqZr7-IEyN-Fp'
console.log(seniorID([8, 4, 2, 1]));               // 'EUWiP1Fv-eBWp-aw-t'
console.log(seniorID([8, 4, 4, 4, 12]));           // 'CULsKi5d-tP6u-ghe1-noGU-uemm0sxexuhY'
console.log(seniorID([8, 4, 4, 4, 12], "abc123")); // '21ac2b3c-b3a3-3ab3-cccb-13a313aaa1a2'
```

## Arguments
> Returns a string

| Order |  Parameter  |   Type   | Default                                                          |
| :---: | :---------: | :------: | :--------------------------------------------------------------- |
|   1   | lengthArray | number[] | [8, 4, 4, 4, 12]                                                 |
|   2   | characters  |  string  | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" |

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/rand-id~~
>>> `@ssts/id` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/int
Description: Get a random integer number within a range, between two numbers min and max.
Author: Senior Sedo
Latest version: 2.0.0

# Get a random integer number within a range, between two numbers min and max

One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `number` between **min** and **max** numbers 😍

## Install
```shell
npm i @ssts/int
```
## Import
```js
import seniorINT from "@ssts/int";
```
## Use
```ts
const randomInteger: number = seniorINT(0, 100);
```

## Arguments
> Returns a number

| Order |  Parameter  |   Type   | Default  |
| :---: | :---------: | :------: | :------- |
|   1   |     min     |  number  | required |
|   2   |     max     |  number  | required |

## Examples

```ts
import seniorINT from "@ssts/int";

console.log(seniorINT(0, 10));       // 8
console.log(seniorINT(0, 100));      // 55
console.log(seniorINT(-100, 100));   // 74
console.log(seniorINT(-100, 100));   // -61
console.log(seniorINT(15, 222));     // 48
```

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/rand-int~~
>>> `@ssts/int` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/item
Description: Get a random item from an array.
Author: Senior Sedo
Latest version: 0.0.6

# Get a random item from an array

One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `item` from an **array** 😍

## Install
```shell
npm i @ssts/item
```
## Import
```js
import seniorITEM from "@ssts/item";
```
## Use
```ts
const randomItem = seniorITEM(["Item 1", "Item 2", "Item 3"]);
```

## Arguments
> Returns a random item from an array or undefined if the array is empty

| Order |  Parameter  |   Type   | Default  |
| :---: | :---------: | :------: | :-------: |
|   1   |    array    |  any[]   | required |

## Examples

```ts
import seniorITEM from "@ssts/item";

const snacks = ["Peanuts", "Chips", "Candy", "Chocolate", "Popcorn", "Cookies", "Donuts", "Ice cream", "Yogurt", "Brownies", "Cupcakes", "Gummies", "Muffins", "Your favorite drink lol"] as const;

const randomSnack = seniorITEM(snacks);
console.log(randomSnack);                   // 'Chips'

type Snacks = (typeof snacks)[number];
// It's okay With/Without a generic
console.log(seniorITEM(snacks));            // 'Cookies'
console.log(seniorITEM<Snacks>(snacks));    // 'Candy'

type Item = {
  key: string;
  name: string;
  imgSrc: string;
};
type Items = Item[];
const items: Items = [/* ... */];

console.log(seniorITEM([]));                // undefined
console.log(seniorITEM(items));             // { key: "17", name: "Item 17", imgSrc: "https://picsum.photos/200" }
console.log(seniorITEM<Item>(items));       // { key: "5", name: "Item 5", imgSrc: "https://picsum.photos/200" }
```

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/rand-item~~
>>> `@ssts/item` for simplicity sake 😍
***
---
---
---
___
npm package: @ssts/wait
Description: Promise wait | Good for development.
Author: Senior Sedo
Latest version: 0.0.2

# Promise wait | Good for development.

<!-- One **straight** *forward* ***function*** ~~that~~ <mark>returns</mark> <sup>a</sup> <sub>random</sub> `number` between **min** and **max** numbers 😍 -->
One **straight** *forward* ***function*** ~~that~~ `waits` | Good for <mark>development</mark> purposes 😍

## Install
```shell
npm i -D @ssts/wait
```
## Import
```js
import seniorWAIT from "@ssts/wait";
```
## Use
```ts
async function handleSomething(): Promise<void> {
  await seniorWAIT(1000);   // in milliseconds
}
```

## Arguments
> Returns Promise\<void\>

| Order | Parameter |   Type   |  Default  |
| :---: | :-------: | :------: | :-------: |
|   1   | duration  |  number  | 5000 (ms) |

## Example

```ts
import seniorWAIT from "@ssts/wait";

const handleSomething = async (): Promise<void> => {
  try {
    console.log("waiting started");
    await seniorWAIT(2000);   // in milliseconds (2 seconds)
    console.log("waiting done");
    
    await doSomething();

  } catch (error) {
    console.error(error);
  }
}
```

___
---
---
---
***
>   Made With Chocolate By Senior Sedo 😎
>>  Be Chocolateful 💙😍
>>
>>  **ssts** stands for **s**enior-**s**edo-**t**ype**s**cript 💙
>>
>>  So instead of ~~@senior-sedo-typescript/promise-wait~~
>>> `@ssts/wait` for simplicity sake 😍
***
---
---
---
___
npm package: @sstscode/common
Description: Common utilities for SSTS projects
Author: SSTS
Latest version: 1.0.2

# @sstscode/common

Common utilities for SSTS projects

## Installation

```bash
npm install @sstscode/common
```

## Usage

```typescript
import { HyperRequest } from '@sstscode/common'

// 创建一个新的请求实例
const hyperRequest = new HyperRequest({
  baseURL: '/api', // 可选的基础URL
  interceptors: {
    requestInterceptor: (config) => config,
    responseInterceptor: (response) => response
  }
})

// Basic GET request
hyperRequest
  .get({
    url: '/data',
    showLoading: true // 可选的loading显示控制
  })
  .then((response) => console.log(response))

// Basic POST request
hyperRequest
  .post({
    url: '/endpoint',
    data: { key: 'value' },
    method: 'POST'
  })
  .then((result) => console.log(result))
```

## API Reference

### HyperRequest Class

- Constructor(config: HyperRequestConfig): 初始化新的请求实例。
- request<T>(config: HyperRequestConfig): Promise<T> - 发送自定义配置的HTTP请求。
- get<T>(config: HyperRequestConfig<T>): Promise<T> - 发送GET请求。
- post<T>(config: HyperRequestConfig<T>): Promise<T> - 发送POST请求。
- delete<T>(config: HyperRequestConfig<T>): Promise<T> - 发送DELETE请求。
- patch<T>(config: HyperRequestConfig<T>): Promise<T> - 发送PATCH请求。

## Development

1. Clone the repository
2. Install dependencies: `npm install`
3. Build the project: `npm run build`
4. Run tests: `npm test`
npm package: @sstscode/ezware
Description: EZWare device driver module for SSTS system
Author: SSTS Team
Latest version: 1.1.12

# @sstscode/ezware

EZWare device driver module for SSTS system

## Installation

```bash
npm install @sstscode/ezware
```

## Usage

```typescript
import { useEZWare } from '@sstscode/ezware'
import type { EventFunctionType, EventResultType } from '@sstscode/ezware'

// Define your event handlers
const globalEventFunction: EventFunctionType = (event) => {
  console.log('Event received:', event)
}

const globalEventResult: EventResultType = (result) => {
  console.log('Result received:', result)
}

// Initialize EZWare with default WebSocket URL (ws://localhost:8887)
const devices = useEZWare(globalEventFunction, globalEventResult)

// Or specify custom WebSocket URL
// const devices = useEZWare(globalEventFunction, globalEventResult, 'ws://your-url:port');
```

## Available Device Drivers

- **Barcode Scanner**: `barcode`
- **Bill Validator**: `billValidator`
- **Camera (Common)**: `camCommon`
- **Signature Camera**: `camSignature`
- **Card Dispenser**: `cardDispenser`
- **IC Card Reader**: `icCardReader`
- **Card Dispenser Reader**: `cardDispenserReader`
- **ID Card Reader (Inductive)**: `idCardReader`
- **ID Card Reader (Insertion)**: `idCardReader1`
- **Card Reader**: `cardReader`
- **SS Card Reader**: `ssCardReader`
- **Swipe Card Reader**: `swCardReader`
- **PIN Pad**: `pinPad`
- **Check Printer**: `ptrCheckPrinter`
- **Check Scanner**: `ptrCheckScanner`
- **Document Printer**: `documentPrinter`
- **Fingerprint Scanner**: `ptrFinger`
- **Label Printer**: `labelPrinter`
- **Passbook Printer**: `passbookPrinter`
- **Receipt Printer**: `receiptPrinter`
- **Scanner**: `ptrScanner`
- **Sensors Interface Unit**: `siu`
- **Base Com Ctrl**: `baseComCtrl`
- **DJ Sign Ctrl**: `dJSignCtrl`
- **Duo Wen IME Inspur**: `duoWenIMEInspur`
- **Duo Wen IME**: `duoWenIME`
- **Ftp Plugin Ctrl**: `ftpPluginCtrl`
- **Http Plugin Ctrl**: `httpPluginCtrl`
- **Insp Pub Ctrl**: `inspPubCtrl`
- **OS Plugin Ctrl**: `oSPluginCtrl`
- **Sapi Sp Voice Ctrl**: `sapiSpVoiceCtrl`
- **WScript Shell Ctrl**: `wScriptShellCtrl`

## Configuration

The default WebSocket URL is `ws://localhost:8887`. You can override this by passing a custom URL as the third parameter to `useEZWare()`.

## TypeScript Support

This package includes TypeScript type definitions. The main types are:

- `EventFunctionType`: Type for event handler function
- `EventResultType`: Type for result handler function

## License

MIT