open-index/open-npm huggingface dataset:
npm package: @sovereignjs/core
Description: <p align="center">   <picture>     <source media="(prefers-color-scheme: dark)" srcset="https://github.com/rschristian/sovereign/assets/33403762/84428bf1-ce01-44a7-8a5c-f0a2884a787b#gh-dark-mode-only">     <img src="https://github.com/rschristian/sovereig
Latest version: 0.1.7

# Sovereign

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://github.com/rschristian/sovereign/assets/33403762/84428bf1-ce01-44a7-8a5c-f0a2884a787b#gh-dark-mode-only">
    <img src="https://github.com/rschristian/sovereign/assets/33403762/8fdeeb24-2a7c-4002-a94d-208be37eb134#gh-light-mode-only">
  </picture>
</p>

<h2 align="center">Mashup of Vite, WMR, and my own preferences</h2>
<h3 align="center"><pre>yarn create sovereign</pre></h3>

Sovereign is a more or less an attempt at bringing some of WMR's quality of life features for Preact users into Vite.

## License

[MIT](https://github.com/rschristian/sovereign/blob/master/LICENSE)
npm package: @sovgut/object-validation
Description: ```typescript import validateObject, { property, Scheme } from '@sovgut/object-validation';
Author: Sergey Sovgut
Latest version: 1.2.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

```typescript
import validateObject, { property, Scheme } from '@sovgut/object-validation';

const request = {
  body: {
    email: 'example@email.com',
    password: 'superSecretPassw0rd!',
    confirmPassword: 'superSecretPassw0rd!',
  },
};

const validationScheme: Scheme[] = [
  property('email:string'),
  property('password:string').min(8).max(32),
  property('confirmPassword:string').min(8).max(32).compareWith('password'),
  property('age:number').optional(),
];

const { success, reason } = validateObject(request.body, validationScheme);
console.log(success, reason);
```

API

<hr />

### `property(key: "name:primitive"): Scheme`

_Params_

- `key` - first part of this string is the property name from the object, second is the type of property from the object

_Returns_

- `min(length: number)` - sets the minimum of length for string source
- `max(length: number)` - sets the maximum of length for string source
- `compareWith(key: string)` - sets comparison within source and target properties
- `onValidate(callback: (value: any) => string | void)` - sets additional custom validation for source property, should return an error string like `"something-wrong-happened"` or nothing (`void`)
- `optional()` - sets source property as optional and any validations just skipped this property if error raised

<hr />

### `validateObject(target: any, scheme: Scheme[]): Response`

_Params_

- `target` - the source object that should be validated
- `scheme` - validation scheme array

_Returns_

- `response` - the response object that have `success` and `reason` properties, `reason` is `undefined` by default, this object have text when error raised
npm package: @soviet.brides/auth-middleware
Description: NestJS Auth MiddleWare
Author: soviet.brides
Latest version: 0.0.1

<h1 align="center"></h1>

<div align="center">
  <a href="http://nestjs.com/" target="_blank">
    <img src="https://nestjs.com/img/logo_text.svg" width="150" alt="Nest Logo" />
  </a>
</div>

<h3 align="center">NestJS npm Package Starter</h3>

<div align="center">
  <a href="https://nestjs.com" target="_blank">
    <img src="https://img.shields.io/badge/built%20with-NestJs-red.svg" alt="Built with NestJS">
  </a>
</div>

### Installation

1. Clone the repo
2. Run npm/yarn install

```bash
cd nestjs-package-starter
npm install
```

## Change Log

See [Changelog](CHANGELOG.md) for more information.

## Contributing

Contributions welcome! See [Contributing](CONTRIBUTING.md).

## Author

**John Biundo (Y Prospect on [Discord](https://discord.gg/G7Qnnhy))**

## License

Licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
npm package: @sovpro/afloat
Description: Float an integer value
Author: sovpro
Latest version: 1.1.0

# Afloat

Float an integer value.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/afloat/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/afloat/commits/master)

```js
let value = afloat (987654321.1)
// value will be: 0.987654321
```

## Preserve floating digits

```js
let value = afloat (987654321.1, true)
// value will be: 0.9876543211
```
npm package: @sovpro/and-prior
Description: Wrap a function to return the current and prior computed value
Author: sovpro
Latest version: 1.0.4

# And Prior 

Wrap a function to return the current and prior computed value

[![Build status for Node.js 0.12 and higher](https://github.com/sovpro/and-prior/workflows/Node.js%200.12%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/and-prior/commits/master)

## Access the value and prior value

```js
// make an "and prior" wrapped getEvent
var getEventAP = andPrior (getEvent)
// call the "and prior" wrapped getEvent
var event_ap = getEventAP ()
// access the value and prior value
if (event_ap.value === event_ap.prior) {
  // do stuff when value is same as prior
}
```

## sameAsPrior shortcut method

```js
// make an "and prior" wrapped getEvent
var getEventAP = andPrior (getEvent)

function logEvents () {
  // call the "and prior" wrapped getEvent
  var event_ap = getEventAP ()
  // check if the return value is the same as the prior
  if (event_ap.sameAsPrior ()) {
   // do nothing when value is same as prior
   return
  }
  // do stuff when value is different
}
``` 

## Customize sameAsPrior comparison

```js
function sum (a, b) {
  return a + b
}

// configuration for the custom sameAsPrior
var custom_config = {
  sameAsPrior: function (value, prior) {
    var value_rounded = Math.round (value)
    var prior_rounded = Math.round (prior)
    // compare value and prior after rounding
    return value_rounded === prior_rounded
  }
}

// make an "and prior" wrapped sum
// and use the custom configuration
var sumAP = andPrior (sum, custom_config)

var first_ap = sumAP (1.1, 1.2)
var second_ap = sumAP (1.1, 1.1)

// this will log: true
console.log (second_ap.sameAsPrior ())
```

In the code above, the return value of `first_ap.sameAsPrior ()` will be `false` assuming no prior computed value by `sumAP`. The return value of `second_ap.sameAsPrior ()` will be `true` because the custom "same as prior" function performs rounding before comparison.
npm package: @sovpro/davrc
Description: A command-line utility to send control protocol commands to a Denon AVR
Author: sovpro
Latest version: 1.0.1

# davrc

A command-line utility to send control protocol commands to a Denon AVR.

```bash
npm i -g @sovpro/davrc

davrc --help
```

## Examples

*The example commands below are not guaranteed to work for your AVR equipment. Consult the relevant documentation available for your AVR equipment.*

Display main zone channel volume state
```bash
davrc --host <host> --CV?
```

Display zone 2 channel volume state
```bash
davrc --host <host> --Z2CV?
```

Turn up main zone master volume by a step
```bash
davrc --host <host> --MVUP
```

Turn up zone 2 master volume by a step
```bash
davrc --host <host> --Z2UP
```

Turn up the main zone front left channel volume by a step
```bash
davrc --host <host> --CVFL UP
```

Turn up the main zone and zone 2 front left channel volume by a step
```bash
davrc --host <host> --CVFL UP --Z2CVFL UP
```

Set host environment variable for command 
```bash
# Get main zone on/off state

DAVRC_HOST=<host> davrc --ZM?
```

Set host environment variable for terminal session 
```bash
# Get main zone and zone 2 on/off state

export DAVRC_HOST=<host>

davrc --ZM?
davrc --Z2?
davrc --ZM? --Z2?
```

# Notice

This unsponsored software is provided, subject to a MIT license, unofficially and independently of Sound United, LLC, its affiliates, subsidiaries and brands (such as Denon and any such not listed here).
npm package: @sovpro/delimited-stream
Description: A Transform stream emitting buffered data at each delimiter instance
Author: sovpro
Latest version: 1.1.0

# Delimited Stream

A Node.js Transform stream emitting buffered data at each delimiter instance.

[![Build status for Node.js 8.x and newer](https://github.com/sovpro/delimited-stream/workflows/Node.js%208.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/delimited-stream/commits/master)

## Constructor

The constructor requires a Buffer instance or string value representing the delimiter.

```js
const stream = new DelimitedStream (delimiter)
```

Buffered data is emitted without the delimiter by default. To keep the delimiter, pass a [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy) value as the second parameter.

```js
// include delimiter in data
const stream = new DelimitedStream (delimiter, true)
```

## Example

Instantiate a stream with a [newline](https://en.wikipedia.org/wiki/Newline) sequence as the delimiter.

```js
const delimiter = Buffer.from ("\r\n")
const stream = new DelimitedStream (delimiter)
stream.on ('data', (data) => {
  const line = data.toString ('utf8')
  // do stuff
})
```
npm package: @sovpro/get-digit
Description: Get a digit value from an integer number
Author: sovpro
Latest version: 1.1.2

# Get Digit

Get a digit value from an integer number.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/get-digit/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/get-digit/commits/master)

```js
let value = getDigit (4, 123456789)
// value will be: 6
```

## Specify a base

```js
// get base 5 digit 3 from value 25
let value = getDigit.base (5, 3, 25)
// value will be: 1
```
npm package: @sovpro/join-float
Description: Join two arrays of single-digit numbers into a float number
Author: sovpro
Latest version: 1.0.0

# Join Float

Join two arrays of single-digit numbers into a float number.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/join-float/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/join-float/commits/master)

## Join into two arrays

```js
let split_arrays = [[1, 2, 3], [4, 5, 6]]
let join = joinFloat (split_arrays)
```
npm package: @sovpro/join-num
Description: Join an array of single-digit integer numbers
Author: sovpro
Latest version: 1.0.0

# Join Number

Join an array of single-digit integer numbers.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/join-num/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/join-num/commits/master)

## Join from an array

```js
let join_num = joinNum ([1, 2, 3])
```

## Join from an iterable value

```js
let join_num = joinNum (
  Array.from (iterable_value)
)
```
npm package: @sovpro/ocafe
Description: Once a callback attached to the first emitted event
Author: sovpro
Latest version: 1.0.5

# Ocafe

Once a callback attached to the first emitted event

[![Build status for Node.js 0.x and newer](https://github.com/sovpro/ocafe/workflows/Node.js%200.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/ocafe/commits/master)

## Usage

```js
var cancel = ocafe (
    event_emitter
  , 'thisEvent'
  , thisEventCallback
  , { event: 'thatEvent' ,
      callback: thatEventCallback }
)
```

## Parameters

#### Event Emitter

The first parameter must be an object that inherits EventEmitter or implements the EventEmitter interface.

#### Event names and callbacks

Event names and callbacks may be passed as ordered arguments and/or objects having an `event` and `callback` property.

## Cancellation

```js
var cancel = ocafe (
  event_emitter
  // , [name], [callback]
  // , [name], [callback]
)
// cancelled is true if called before
// any of the events above emitted
var cancelled = cancel ()
```

`ocafe` returns a `cancel` function that, if called before one of the events is emitted, will prevent the callbacks passed as arguments from being run.
npm package: @sovpro/promise-connect
Description: Promise a connected socket
Author: sovpro
Latest version: 1.1.2

# Promise Connect

Promise a connected socket.

## Overview

Promise Connect accepts the same parameters as [`net.createConnection`](https://nodejs.org/api/net.html#net_net_createconnection) and [`net.connect`](https://nodejs.org/api/net.html#net_net_connect)

## Usage

```js
try {
  const socket = await promiseConnect (port, host)
}
catch (error) {
  // handle error
}
```

### Connect Timeout

A non-standard (opt-in) option, `connectTimeout`, representing the milliseconds to wait for a connection is available. If not specified the default value for connectTimeout is 0, disabling the connect timeout. 

If `connectTimeout` is specified, and a connection is not made before the time specified in `connectTimeout` has passed, an error with message set to 'Connect timeout' is thrown.

```js
try {
  const socket = await promiseConnect ({
      port
    , host
    , connectTimeout: 5000 
  })
}
catch (error) {
  // error.message might be 'Connect timeout'
}
```

### Connect Listener

If a connect listener is specified, it is called after promise fulfillment.

```js
try {
  const socket = await promiseConnect (
      port
    , host
    , onConnect
  )
  function onConnect () {
    const ip_addr = socket.address().address
    console.log ('Connected to ' + address)
  }
}
catch (error) {
  // handle error
}
```
npm package: @sovpro/split-float
Description: Split a floating number into two arrays or two iterable values of single-digit numbers
Author: sovpro
Latest version: 1.0.1

# Split Float

Split a floating number into two arrays or two iterable values of single-digit numbers.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/split-float/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/split-float/commits/master)

## Split into two arrays

```js
let split_arrays = splitFloat (123.456)
let integer_digits = split_arrays[0]
let floating_digits = split_arrays[1]
```

## Split into two iterable values

```js
let split_iterables = splitNum.lazy (123.456)
let integer_sigits = split_iterables[0]
let floating_sigits = split_iterables[1]
for (let digit of integer_digits) {
  // ... do stuff with integer digit
}
for (let digit of floating_digits) {
  // ... do stuff with floating digit
}
```
npm package: @sovpro/split-num
Description: Split an integer number into an array or iterable value of single-digit numbers
Author: sovpro
Latest version: 1.0.6

# Split Number

Split an integer number into an array or iterable value of single-digit numbers.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/split-num/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/split-num/commits/master)

## Split into an array

```js
let split_num = splitNum (123)
```

## Split into an iterable value

```js
let split_iterable = splitNum.lazy (123)
for (let digit of split_iterable) {
  // ... do stuff with digit
}
```
npm package: @sovpro/split-randomly
Description: Split a string randomly into a given or random count of substrings
Author: sovpro
Latest version: 1.0.2

# Split Randomly

Split a string randomly into a given or random count of substrings.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/split-randomly/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/split-randomly/commits/master)

## Split randomly into a given count of substrings

```js
var hello_str = 'Hello, World!'
var substring_count = 5
var substrings = splitRandomly (hello_string, substring_count)
```

## Split randomly into a random count of substrings

```js
var hello_str = 'Hello, World!'
var substrings = splitRandomly (hello_string)
```
npm package: @sovpro/unfloat
Description: Unfloat a floating value to an integer number
Author: sovpro
Latest version: 1.1.1

# Unfloat

Unfloat a floating value to an integer number.

[![Build status for Node.js 4.x and newer](https://github.com/sovpro/unfloat/workflows/Node.js%204.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/unfloat/commits/master)

```js
let unfloated_val = unfloat (1.123456789)
// unfloated_val will be: 123456789
```

## Preserve integer digits

```js
let unfloated_val = unfloat (1.123456789, true)
// unfloated_val will be: 1123456789
```
npm package: @sovpro/zclopts
Description: Zero-configuration command-line option parsing
Author: sovpro
Latest version: 1.0.0

# zclopts

Zero-configuration command-line option parsing

[![Build status for Node.js 8.x and newer](https://github.com/sovpro/zclopts/workflows/Node.js%208.x%20and%20newer%20/badge.svg?branch=master)](https://github.com/sovpro/zclopts/commits/master)

## Example

Example script:
```js
// show-options.js
import zclopts from '@sovpro/zclopts'

const argv = process.argv.slice (2)
const opts = zclopts (argv)

console.log (opts)
```

Example execution:
```bash
node ./show-options.js -abc yes -no-xyz no --param one two -vvv --param three
```

Example output:
```js
Map {
  'a' => true,
  'b' => true,
  'c' => 'yes',
  'x' => false,
  'y' => false,
  'z' => 'no',
  'param' => [ 'one two', 'three' ],
  'v' => 3 }
```

## Flags

`node my-script.js -f`
```js
Map { 'f' => true }
```

`node my-script.js -no-f`
```js
Map { 'f' => false }
```

Double Flag

`node my-script.js -ff`
```js
Map { 'f' => 2 }
```

`node my-script.js -no-ff`
```js
Map { 'f' => false }
```

Flag with value

`node my-script.js -f value`
```js
Map { 'f' => 'value' }
```

Flag with sequential values

`node my-script.js -f value-1 value-2`
```js
Map { 'f' => 'value-1 value-2' }
```

Flag occurring more than once

`node my-script.js -f value-1 value-2 -f value-3 value-4`
```js
Map { 'f' => 'value-3 value-4' }
```

Flag group

`node my-script.js -abc`
```js
Map { 'a' => true, 'b' => true, 'c' => true }
```

`node my-script.js -no-abc`
```js
Map { 'a' => false, 'b' => false, 'c' => false }
```

Flag group with trailing value

`node my-script.js -abc value`
```js
Map { 'a' => true, 'b' => true, 'c' => 'value' }
```

`node my-script.js -no-abc value`
```js
Map { 'a' => false, 'b' => false, 'c' => 'value' }
```

Flag as a parameter

`node my-script.js -f=value`
```js
Map { 'f' => 'value' }
```

## Params

`node my-script.js --param`
```js
Map { 'param' => undefined }
```

Param with value

`node my-script.js --param value`
```js
Map { 'param' => 'value' }
```

`node my-script.js --param=value`
```js
Map { 'param' => 'value' }
```

Param with sequential values

`node my-script.js --param value-1 value-2`
```js
Map { 'param' => 'value-1 value-2' }
```

Param occurring more than once

`node my-script.js --param value-1 value-2 --param value-3 value-4`
```js
Map { 'param' => ['value-1 value-2', 'value-3 value-4'] }
```