open-index/open-npm huggingface dataset:
npm package: @produck/charon
Description: Doing small thing for compressing bundle by tree shaking
Author: LiuQ-Q
Latest version: 0.3.0

# `charon`

> TODO: description

## Specification

- Each function name MUST use camel identifier
- One file, one function, one jsdoc annotation
- File names is their exported function name
- Directory names is namespaces & category, `<namespace>/index.js`
- Aliases asigned in `<namespace>/index.js`
- Document annotations conforms to usage

## Usage

```
const charon = require('charon');

// TODO: DEMONSTRATE API
```
npm package: @produck/es-abstract-token
Description: An easy way to define abstract constructor (or class) in Javascript.
Author: ChaosLee
Latest version: 0.2.2

# @produck/es-abstract-token

An easy way to define abstract constructor (or class) in Javascript.

## Installation

```bash
npm install @produck/es-abstract-token
```

## Features

- **Following Convention**

  Providing methods to represent `abstract` & `static` opertators like other
  major programming languages. Making a native constructable function to be
  abstract in `Abstract`.

- **Abstract Constructor**

- **Abstract Member** Defining members in a way like traditional. There are
  classical reserved word

- **Member Field Instance/Static** Members to instances or members to a
  constructable.

- **NO Instantiation** There has been a mechanism to ensure that instantiation
  of an abstract constructable is prohibited.

- **Runtime Checking** Members implementation will be checked when they are
  accessed. Even if it is not fully implemented or incorrectly.

- **Reserved Word Style**

- **Erasing in Production**

- **Strict/loose Dependency** about error users.

- **No Error Flag**

## Quick Start

```js
import Abstract, { Any } from "@produck/es-abstract-token";

const AbstractSample = Abstract(
	class Sample {
		superMember = "foo";
	},
	...[
		Abstract({
			foo: Any,
		}),
		Abstract("bar"),
		Abstract.Static({
			baz: Any,
		}),
		Abstract.Static("qux"),
	],
);

// ❌ Error: Illegal construction on an abstract constructor.
new AbstractSample();

class Sample extends AbstractSample {
	foo = "implemented";
	static baz = "implemented";
}

// ✔ Creating a new instance is OK.
const sample = new Sample();

// ❌ Error: Instance member "bar" is NOT implemented.
sample.bar;

// ✔ Accessing `.foo` OK.
sample.foo;

// ❌ Error: Instance member "qux" is NOT implemented.
Sample.qux;

// ✔ Accessing `::baz` OK.
Sample.baz;
```

##

## API

## License

MIT

## Author

Produck
npm package: @produck/is-constructor
Description: Use a modern way to check if it is a constructor.
Author: ChaosLee
Latest version: 1.0.1

# @produck/is-constructor

Use a modern way to check if it is a constructor.

## Installation

```bash
npm install @produck/is-constructor
```

## Usage

### `isExtensable(value)`

Check if a value can be extended as a class base.

```javascript
import { isExtensable } from "@produck/is-constructor";

// Classes and functions
class MyClass {}
isExtensable(MyClass); // true

function MyFunction() {}
isExtensable(MyFunction); // true

// Built-in constructors
isExtensable(Object); // true
isExtensable(Array); // true

// Special case: null can be extended
isExtensable(null); // true

// Non-extensible values
isExtensable(undefined); // false
isExtensable(42); // false
isExtensable("string"); // false
```

### `isConstructor(value)`

Check if a value is a constructor function.

```javascript
import { isConstructor } from "@produck/is-constructor";

// Classes
class MyClass {}
isConstructor(MyClass); // true

// Regular functions
function MyFunction() {}
isConstructor(MyFunction); // true

// Built-in constructors
isConstructor(Object); // true
isConstructor(Array); // true
isConstructor(Date); // true

// Arrow functions
const arrowFunc = () => {};
isConstructor(arrowFunc); // false

// Async functions
async function asyncFunc() {}
isConstructor(asyncFunc); // false

// Generator functions
function* generatorFunc() {}
isConstructor(generatorFunc); // false

// Async generator functions
async function* asyncGeneratorFunc() {}
isConstructor(asyncGeneratorFunc); // false

// Non-functions
isConstructor(null); // false
isConstructor(undefined); // false
isConstructor(42); // false
isConstructor("string"); // false
isConstructor({}); // false
```

## API

### `isExtensable(value: unknown): boolean`

Determines whether the given value can be extended as a class base.

**Parameters:**

- `value` - Any JavaScript value to test

**Returns:**

- `true` if the value can be used as a base in a class extends
  clause
- `false` otherwise

### `isConstructor(value: unknown): boolean`

Determines whether the given value can be used as a constructor.

**Parameters:**

- `value` - Any JavaScript value to test

**Returns:**

- `true` if the value is a constructor function (class or
  regular function that can be called with `new`)
- `false` otherwise

## How It Works

The implementation uses the technique of trying to extend the value as a
class:

```javascript
function isExtensable(value) {
	try {
		void class extends value{};
		return true;
	} catch {
		return false;
	}
}
```

This approach:

- ✓ Works with regular functions
- ✓ Works with class declarations
- ✓ Works with built-in constructors (Object, Array, Date, etc.)
- ✓ Correctly identifies non-constructors (arrow functions, async
  functions, generators, etc.)

## License

MIT
npm package: @produck/is-sub-constructor
Description: Use a modern way to check if a constructor is a sub-constructor (derived class) of another.
Author: ChaosLee
Latest version: 1.0.2

# @produck/is-sub-constructor

Check if a constructor is a sub-constructor (derived class) of another.

## Installation

```bash
npm install @produck/is-sub-constructor
```

## Usage

```js
import { isSubConstructor } from "@produck/is-sub-constructor";

class Animal {}
class Dog extends Animal {}
class Bulldog extends Dog {}

isSubConstructor(Dog, Animal); // true
isSubConstructor(Bulldog, Animal); // true
isSubConstructor(Animal, Animal); // false
isSubConstructor(Animal, Dog); // false
isSubConstructor(123, Animal); // false
isSubConstructor(Array, Object); // true
```

## API

### `isSubConstructor(value, base)`

Returns `true` if `value` is a sub-constructor (derived class) of `base`,
`false` otherwise.

- **value** `unknown` - The value to check.
- **base** `constructor` - The base constructor to check against.
- **Returns** `boolean`
- **Throws** `TypeError` - If `base` is not a constructor.

## License

MIT
npm package: @produck/jsonrpc-duplex
Description: Using jsonrpc client & server to implement duplex-jsonrpc peer.
Author: ChaosLee
Latest version: 0.1.3

@produck/jsonrpc-duplex
============================

[![npm (scoped)](https://img.shields.io/npm/v/@produck/jsonrpc-duplex?style=flat-square)](https://www.npmjs.org/package/@produck/jsonrpc-duplex)
[![Travis (.org)](https://img.shields.io/travis/produck/jsonrpc?style=flat-square)](https://travis-ci.org/github/produck/jsonrpc)
[![Coveralls](https://img.shields.io/coveralls/github/produck/jsonrpc?style=flat-square)](https://coveralls.io/github/produck/jsonrpc)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg?style=flat-square)](https://lerna.js.org/)
[![NPM](https://img.shields.io/npm/l/@produck/jsonrpc?style=flat-square)](https://opensource.org/licenses/MIT)
## JSON-RPC specification

* https://www.jsonrpc.org/
npm package: @produck/ow
Description: Throwing exception regularly.
Author: ChaosLee
Latest version: 0.2.3

# @produck/ow

Throwing exception regularly.

## Installation

```bash
npm install @produck/ow
```

## Usage

```js
import * as Ow from "@produck/ow";
```

### `Ow.throw(value)`

Throws the given value directly.

```js
Ow.throw(new Error("something went wrong"));
// => throws Error: something went wrong

Ow.throw("plain string");
// => throws 'plain string'
```

### `Ow.Thrower(ErrorConstructor)`

Creates a thrower function bound to the specified error constructor. The
returned function accepts the same arguments as the error constructor and
throws the constructed error.

```js
const throwTypeError = Ow.Thrower(TypeError);

throwTypeError("invalid type");
// => throws TypeError: invalid type

class CustomError extends Error {
	constructor(message) {
		super(message);
		this.name = "CustomError";
	}
}

const throwCustom = Ow.Thrower(CustomError);

throwCustom("custom message");
// => throws CustomError: custom message
```

### `Ow.Error`

A collection of pre-built thrower functions for all built-in error types.

| Thrower              | Error Type       |
| -------------------- | ---------------- |
| `Ow.Error.Common`    | `Error`          |
| `Ow.Error.Eval`      | `EvalError`      |
| `Ow.Error.Range`     | `RangeError`     |
| `Ow.Error.Reference` | `ReferenceError` |
| `Ow.Error.Syntax`    | `SyntaxError`    |
| `Ow.Error.Type`      | `TypeError`      |
| `Ow.Error.URI`       | `URIError`       |
| `Ow.Error.Aggregate` | `AggregateError` |

```js
Ow.Error.Type("expected a string");
// => throws TypeError: expected a string

Ow.Error.Range("index out of bounds");
// => throws RangeError: index out of bounds

Ow.Error.Aggregate([err1, err2], "multiple errors");
// => throws AggregateError: multiple errors
```

## TypeScript

Type definitions are included. All thrower functions are fully typed with
`ConstructorParameters` inference.

```ts
import * as Ow from "@produck/ow";

Ow.Error.Type("msg"); // (...args: ConstructorParameters<TypeErrorConstructor>) => never
Ow.throw(new Error()); // (any: unknown) => never
```

## Why

In JavaScript, `throw` is a statement, not an expression. This means
it cannot be used directly in arrow functions, ternary expressions,
or logical chains. `@produck/ow` wraps `throw` into function calls,
making exception throwing more flexible and composable.

```js
// Without ow — statement only, cannot inline
if (!input) {
	throw new TypeError("input is required");
}

// With ow — works as an expression
const value = input ?? Ow.Error.Type("input is required");

// Arrow function — throw is not allowed in expression body
const assertString = (v) =>
	typeof v === "string" || Ow.Error.Type("expected a string");
```

`Thrower()` creates reusable thrower functions that can be assigned,
passed around, and shared — no need to repeat
`throw new XxxError(...)` everywhere.

All thrower functions return `never` in TypeScript, so the compiler
correctly infers that control flow does not continue past the call.

## License

MIT © Produck Shop
npm package: @produck/package-meta-extractor
Description: Extract metadata from npm packages.
Author: ChaosLee
Latest version: 1.0.0

# @produck/package-meta-extractor

Extract metadata from `package.json` and generate a module file exporting named
constants.

## Installation

```bash
npm install @produck/package-meta-extractor
```

## Usage

```js
import { PackageExtractor } from "@produck/package-meta-extractor";

const extractor = new PackageExtractor("/path/to/project");

// Read package.json
await extractor.read();

// Generate ECMAScript module (default)
await extractor.generate("/path/to/output/meta.mjs");

// Generate TypeScript module
await extractor.generate("/path/to/output/meta.ts", "TypeScript");
```

The generated file will contain:

```js
export const NAME = 'your-package-name';
export const VERSION = '1.0.0';
export const DESCRIPTION = 'Your package description.';
```

## API

### `new PackageExtractor(pathname)`

- `pathname` — Absolute path to the directory containing `package.json`.

### `extractor.read()`

Reads `package.json` and extracts the following properties:

| package.json  | Exported constant |
| ------------- | ----------------- |
| `name`        | `NAME`            |
| `version`     | `VERSION`         |
| `description` | `DESCRIPTION`     |

Returns the extracted metadata object.

### `extractor.generate(pathname, language?)`

- `pathname` — Absolute path of the output file. The extension must match the
  target language.
- `language` — `'ECMAScript'` (default) or `'TypeScript'`.

Supported extensions:

| Language   | Extensions    |
| ---------- | ------------- |
| ECMAScript | `.mjs`, `.js` |
| TypeScript | `.ts`, `.mts` |

## License

MIT
npm package: @produck/splitview-vue
Description: A vue plugin of @produck/splitview.
Author: ChaosLee
Latest version: 0.2.1

# @produck/splitview-vue

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).