open-index/open-npm huggingface dataset:
npm package: @libgranite/contrast-color
Description: Contrast color calculator
Author: Rich Gerdes
Latest version: 1.0.0

# SCSS Contrast Color

This package provides a contrast color calculator for scss and js. The library
will calculate if the color has a higher contrast against white or black.

## Using the library

The package provides a js module and a scss mixing for the calculation of the
contrast color.

The library functions will return either 'black' or 'white', based upon the
input color.

### JavaScript

The js module provides two functions. The first, `get_contrast_color_rgb` takes an
RGB color while `get_contrast_color_hex` takes a hex color string.

```js
import {get_contrast_color_rgb, get_contrast_color_hex} form '@grante/contrast-color'

var best_color = get_contrast_color_rgb({red: 100, green: 100, blue: 100});

// or

var best_color_2 = get_contrast_color_hex('#123456');

```

### SCSS

The scss project provides one mixin. It can be used with any css color (Hex, RGB,
or RBGa);

```scss
@import '@grante/contrast-color/_mixin';

div.example {
  background-color: #123456;
  color: @import(#123456);
}
```
npm package: @libgranite/normalize.css
Description: A css layer which standardizes default styles across browsers.
Latest version: 9.0.0

# normalize.css

<a href="https://github.com/libgranite/normalize.css">View on GitHub</a>

> A css layer which standardizes default styles across browsers.

[![npm][npm-image]][npm-url] [![license][license-image]][license-url]
[![changelog][changelog-image]][changelog-url]
[![gitter][gitter-image]][gitter-url]


**NPM**

```sh
npm install --save @libgranite/normalize.css
```


## What does it do?

* Preserves useful defaults, unlike many CSS resets.
* Normalizes styles for a wide range of elements.
* Corrects bugs and common browser inconsistencies.
* Improves usability with subtle modifications.
* Explains what code does using detailed comments.


## Browser support

* Chrome
* Edge
* Firefox ESR+
* Internet Explorer 10+
* Safari 8+
* Opera


## Extended details and known issues

Additional detail and explanation of the esoteric parts of normalize.css.

#### `pre, code, kbd, samp`

The `font-family: monospace, monospace` hack fixes the inheritance and scaling
of font-size for preformatted text. The duplication of `monospace` is
intentional. [Source](https://en.wikipedia.org/wiki/User:Davidgothberg/Test59).

#### `sub, sup`

Normally, using `sub` or `sup` affects the line-box height of text in all
browsers. [Source](https://gist.github.com/413930).

#### `select`

By default, Chrome on OS X and Safari on OS X allow very limited styling of
`select`, unless a border property is set. The default font weight on `optgroup`
elements cannot safely be changed in Chrome on OSX and Safari on OS X.

#### `[type="checkbox"]`

It is recommended that you do not style checkbox and radio inputs as Firefox's
implementation does not respect box-sizing, padding, or width.

#### `[type="number"]`

Certain font size values applied to number inputs cause the cursor style of the
decrement button to change from `default` to `text`.

#### `[type="search"]`

The search input is not fully stylable by default. In Safari on
OSX you can't control `font`, `padding`, `border`, or `background`. Applying
`-webkit-appearance: textfield` addresses these issues without removing the
benefits of search inputs (e.g. showing past searches).

## Contributing

Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the
contribution process easy and effective for everyone involved.


[changelog-image]: https://img.shields.io/badge/changelog-md-blue.svg?style=flat-square
[changelog-url]: CHANGELOG.md
[license-image]: https://img.shields.io/npm/l/normalize.css.svg?style=flat-square
[license-url]: LICENSE.md
[npm-image]: https://img.shields.io/npm/v/normalize.css.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/normalize.css
[gitter-image]: https://img.shields.io/badge/chat-gitter-blue.svg?style=flat-square
[gitter-url]: https://gitter.im/necolas/normalize.css
npm package: @libgranite/scss-variants
Description: SCSS Breakpoint variants
Author: Rich Gerdes
Latest version: 1.0.0

# SCSS Variants

This project provides a scss module to generate breakpoint variants for css rules.

## Usage

The following can be used to load the module from a scss file.

```
@use '@libgrante/variants' as variants with (
  $varients_list: (
    (
      'prefix': 'example',
      'media': '(100px < width < 200px)'
    )
  )
);

@include variants('class') {
  /** rules **/
}

```

The above code will generate the following css.

```
.class {
  /** rules **/
}

.prefix\:class {
  /** rules **/
}
```

## Defaults

A set of default breakpoints is provided.

 - `sm:` - Small - Width: 0 plus
 - `md:` - Medium - Width: 480px plus
 - `lg:` - Large - Width: 769px plus
 - `xl:` - Extra-Large - Width: 1280px plus
npm package: @libharness/consumer
Description: Generic binding layer to link any consumer to any data provider following a shared interface
Author: Jean-Nicolas Veigel art.jnveigel@gmail.com
Latest version: 0.0.5

# @ubloimmo/front-lib-boilerplate

Template repository to create Internal library and private NPM package.

## Prerequisites
- [Bun](https://bun.sh)

## Includes

### Github actions
This template comes with two pre-configured github workflows to your life easier:

- publish.yml :
  - Increments the package revision
  - Builds the package using the `bun run build`
  - Publishes it to the NPM Registry
  - Commits the build and new version to `main`
  - Triggers a release
- release.yml :
  - Bundles the build directory (`/lib`) in a zip file based on the current version
  - Authors a new github release

### Typescript

Bun comes with typescript support out of the box.

Some basic utility types are also included.

### Utils

- Config validator
- Logger

## Getting started

1. Fork this repository or select it as a starting template when creating a new repository.

2. Go to your new repository's secrets settings and add the following values:

   - `NPM_TOKEN`: Personal access token generated in your [account settings](https://docs.npmjs.com/creating-and-viewing-access-tokens).

3. Clone and navigate to your new repository.

```bash
git clone <my repository>
cd <my repository name>  
```

4. Edit `package.json` with your package information.

```bash
# nano
nano package.json
# neovim
nvim package.json
# vscode
code package.json
# webstorm
webstorm package.json
```
- `name`: your package's name
- `description`: your package description
- `author`: your name and npm email
- `homepage`: your repository's URL
- `repository.url`: your repository's URL
- `scripts.build`: a script to build your package before publishing it

5. **Start writing your package !** :rocket:

## Publishing your package

### Before publishing your package

Make sure to replace this README.md file with documentation about your package.

### Triggering the publishing workflow

Once you're satisfied with the current state of your package and have committed it to / merged it onto the `main` branch, you'll want to publish it.

To publish your package to the NPM registry:
1. Navigate to the *Actions* tab of your repository
2. Select `NPM Publish` in the side menu
3. Click on `Run workflow` in the dark blue banner
4. Wait for it to finish

**Note**: Upon successful publishing to NPM, the `Relase create` workflow will automatically run.
npm package: @libharness/core
Description: Core of a generic binding layer to link any consumer to any data provider following a shared interface
Author: Jean-Nicolas Veigel art.jnveigel@gmail.com
Latest version: 0.0.5

# @ubloimmo/front-lib-boilerplate

Template repository to create Internal library and private NPM package.

## Prerequisites
- [Bun](https://bun.sh)

## Includes

### Github actions
This template comes with two pre-configured github workflows to your life easier:

- publish.yml :
  - Increments the package revision
  - Builds the package using the `bun run build`
  - Publishes it to the NPM Registry
  - Commits the build and new version to `main`
  - Triggers a release
- release.yml :
  - Bundles the build directory (`/lib`) in a zip file based on the current version
  - Authors a new github release

### Typescript

Bun comes with typescript support out of the box.

Some basic utility types are also included.

### Utils

- Config validator
- Logger

## Getting started

1. Fork this repository or select it as a starting template when creating a new repository.

2. Go to your new repository's secrets settings and add the following values:

   - `NPM_TOKEN`: Personal access token generated in your [account settings](https://docs.npmjs.com/creating-and-viewing-access-tokens).

3. Clone and navigate to your new repository.

```bash
git clone <my repository>
cd <my repository name>  
```

4. Edit `package.json` with your package information.

```bash
# nano
nano package.json
# neovim
nvim package.json
# vscode
code package.json
# webstorm
webstorm package.json
```
- `name`: your package's name
- `description`: your package description
- `author`: your name and npm email
- `homepage`: your repository's URL
- `repository.url`: your repository's URL
- `scripts.build`: a script to build your package before publishing it

5. **Start writing your package !** :rocket:

## Publishing your package

### Before publishing your package

Make sure to replace this README.md file with documentation about your package.

### Triggering the publishing workflow

Once you're satisfied with the current state of your package and have committed it to / merged it onto the `main` branch, you'll want to publish it.

To publish your package to the NPM registry:
1. Navigate to the *Actions* tab of your repository
2. Select `NPM Publish` in the side menu
3. Click on `Run workflow` in the dark blue banner
4. Wait for it to finish

**Note**: Upon successful publishing to NPM, the `Relase create` workflow will automatically run.
npm package: @libharness/factory
Description: Generic binding layer to link any consumer to any data provider following a shared interface
Author: Jean-Nicolas Veigel art.jnveigel@gmail.com
Latest version: 0.0.5

# @ubloimmo/front-lib-boilerplate

Template repository to create Internal library and private NPM package.

## Prerequisites
- [Bun](https://bun.sh)

## Includes

### Github actions
This template comes with two pre-configured github workflows to your life easier:

- publish.yml :
  - Increments the package revision
  - Builds the package using the `bun run build`
  - Publishes it to the NPM Registry
  - Commits the build and new version to `main`
  - Triggers a release
- release.yml :
  - Bundles the build directory (`/lib`) in a zip file based on the current version
  - Authors a new github release

### Typescript

Bun comes with typescript support out of the box.

Some basic utility types are also included.

### Utils

- Config validator
- Logger

## Getting started

1. Fork this repository or select it as a starting template when creating a new repository.

2. Go to your new repository's secrets settings and add the following values:

   - `NPM_TOKEN`: Personal access token generated in your [account settings](https://docs.npmjs.com/creating-and-viewing-access-tokens).

3. Clone and navigate to your new repository.

```bash
git clone <my repository>
cd <my repository name>  
```

4. Edit `package.json` with your package information.

```bash
# nano
nano package.json
# neovim
nvim package.json
# vscode
code package.json
# webstorm
webstorm package.json
```
- `name`: your package's name
- `description`: your package description
- `author`: your name and npm email
- `homepage`: your repository's URL
- `repository.url`: your repository's URL
- `scripts.build`: a script to build your package before publishing it

5. **Start writing your package !** :rocket:

## Publishing your package

### Before publishing your package

Make sure to replace this README.md file with documentation about your package.

### Triggering the publishing workflow

Once you're satisfied with the current state of your package and have committed it to / merged it onto the `main` branch, you'll want to publish it.

To publish your package to the NPM registry:
1. Navigate to the *Actions* tab of your repository
2. Select `NPM Publish` in the side menu
3. Click on `Run workflow` in the dark blue banner
4. Wait for it to finish

**Note**: Upon successful publishing to NPM, the `Relase create` workflow will automatically run.
npm package: @libharness/setup
Description: Setup part of a generic binding layer to link any consumer to any data provider following a shared interface
Author: Jean-Nicolas Veigel art.jnveigel@gmail.com
Latest version: 0.0.5

# @ubloimmo/front-lib-boilerplate

Template repository to create Internal library and private NPM package.

## Prerequisites
- [Bun](https://bun.sh)

## Includes

### Github actions
This template comes with two pre-configured github workflows to your life easier:

- publish.yml :
  - Increments the package revision
  - Builds the package using the `bun run build`
  - Publishes it to the NPM Registry
  - Commits the build and new version to `main`
  - Triggers a release
- release.yml :
  - Bundles the build directory (`/lib`) in a zip file based on the current version
  - Authors a new github release

### Typescript

Bun comes with typescript support out of the box.

Some basic utility types are also included.

### Utils

- Config validator
- Logger

## Getting started

1. Fork this repository or select it as a starting template when creating a new repository.

2. Go to your new repository's secrets settings and add the following values:

   - `NPM_TOKEN`: Personal access token generated in your [account settings](https://docs.npmjs.com/creating-and-viewing-access-tokens).

3. Clone and navigate to your new repository.

```bash
git clone <my repository>
cd <my repository name>  
```

4. Edit `package.json` with your package information.

```bash
# nano
nano package.json
# neovim
nvim package.json
# vscode
code package.json
# webstorm
webstorm package.json
```
- `name`: your package's name
- `description`: your package description
- `author`: your name and npm email
- `homepage`: your repository's URL
- `repository.url`: your repository's URL
- `scripts.build`: a script to build your package before publishing it

5. **Start writing your package !** :rocket:

## Publishing your package

### Before publishing your package

Make sure to replace this README.md file with documentation about your package.

### Triggering the publishing workflow

Once you're satisfied with the current state of your package and have committed it to / merged it onto the `main` branch, you'll want to publish it.

To publish your package to the NPM registry:
1. Navigate to the *Actions* tab of your repository
2. Select `NPM Publish` in the side menu
3. Click on `Run workflow` in the dark blue banner
4. Wait for it to finish

**Note**: Upon successful publishing to NPM, the `Relase create` workflow will automatically run.
npm package: @libhub/utils
Description: A toolkit for common JavaScript / TypeScript
Author: MahoushoujoMadoka
Latest version: 0.3.0

# @libhub/utils

[![NPM version](https://img.shields.io/npm/v/@libhub/utils?color=00dc82&label=)](https://www.npmjs.com/package/@libhub/utils)

A toolkit for common JavaScript / TypeScript.

- Tree-shakable ESM
- Fully typed
- Type utilities
npm package: @libii/libii-inner-ui
Description: A react library developed with dumi
Latest version: 0.1.13

# 概述

本项目通过 rollup 作为打包工具进行打包.

主要是提供 TypeScript 类型给 libii inner 的项目使用.

# 快速开始

1. `yarn`

2. `yarn start`

将启动文档

启动本地文档

# 发布到 npm

1. 登录

账户: `libii-yanghongwei`

密码: xxxxxx (参看 git 仓库: libii-know)

邮箱: libii 邮箱

而且还需要一次性验证码（发送到邮箱 - 可能在垃圾箱中）

注意: 2025 年 11 月 6 日 npm 更新了 [token 条款](https://gh.io/npm-token-changes),

所以如果你登录不成功, 则去 [生成 Token](https://www.npmjs.com/settings/libii-yanghongwei/tokens)

- token 有效期只有 90 天, 最新生成的 token 保存在 `libii account.md`

然后更改 npm 全局登录配置的 token, 通常在 `C:\Users\[你的用户名]\.npmrc`

- 如果需要针对各个项目, 则在项目的根目录创建 `.npmrc`, 然后写入 `//registry.npmjs.org/:_authToken=你的token`

2. 切换到 npm 仓库

如果你此时的仓库镜像非 npm, 则需切换到 npm 仓库镜像,

如: `nrm use npm`

- [nrm](https://www.npmjs.com/package/nrm/v/0.1.6)

  `npm i -g nrm`

3. 打包

`yarn build`

*注意*: 第三和第四步可以合并成一个命令

- `npm publish`

  `package.json`` 中的 scripts 命令

4. 使用命令发布到 npm 对应仓库

`npm publish --access public`

发布到 [npm 仓库](https://www.npmjs.com/settings/libii/packages)

- [npm publish 中文](https://nodejs.cn/npm/cli/v8/commands/npm-publish/)

- [npm publish 英文](https://www.npmjs.cn/cli/publish/)

# 目前使用到的仓库

`内部管理系统`

- libii-cost-frontend

`弱联网`

- weak-network-appraise

  评价管理子菜单

更新于 2025 年 11 月 3 日
npm package: @libit/bufferutil
Description: A buffer utils
Author: ty
Latest version: 0.1.1

# @libit/bufferutil

> A buffer utils

## Installation

```shell
npm i @libit/bufferutil
```

## API

### concat(list: Buffer[], totalLength?: number): Buffer

Merges an array of buffers into a new buffer.

### toBuffer(data: any, enc?: BufferEncoding): Buffer

Converts `data` to a `Buffer`.

### toArrayBuffer(buf: Buffer): ArrayBuffer

Converts a buffer to an `ArrayBuffer`.

### mask(source: Buffer, mask: Buffer, output: Buffer, offset: number, length: number)

Masks a buffer using the given mask.

### unmask(buffer: Buffer, mask: Buffer)

Unmasks a buffer using the given mask.
npm package: @libit/bufio
Description: Buffer and serialization utilities for javascript
Author: Mindary
Latest version: 0.4.2

# @libit/bufio

> Buffer and serialization utilities for javascript
>
> This project is TypeScript version from [bufio](https://github.com/bcoin-org/bufio)

## Usage

```js
import assert = require('assert');
import bio = require('@libit/bufio');

const bw = bio.write();
bw.writeU64(100);
bw.writeString('foo');
const data = bw.render();

const br = bio.read(data);
assert(br.readU64() === 100);
assert(br.readString(3) === 'foo');
```

## Struct Usage

```js
import bio = require('@libit/bufio');

class MyStruct extends bio.Struct {
  constructor() {
    super();
    this.str = 'hello';
    this.value = 0;
  }

  write(bw) {
    bw.writeVarString(this.str, 'ascii');
    bw.writeU64(this.value);
    return this;
  }

  read(br) {
    this.str = br.readVarString('ascii');
    this.value = br.readU64();
    return this;
  }
}

const obj = new MyStruct();

console.log('Buffer:');
console.log(obj.encode());

console.log('Decoded:');
console.log(MyStruct.decode(obj.encode()));

console.log('Hex:');
console.log(obj.toHex());

console.log('Decoded:');
console.log(MyStruct.fromHex(obj.toHex()));

console.log('Base64:');
console.log(obj.toBase64());
```

## License

- Copyright (c) 2020, Yuan Tao (MIT License).
- Copyright (c) 2017, Christopher Jeffrey (MIT License).
npm package: @libit/log
Description: Lightweight level based logging system.
Author: Mindary
Latest version: 0.4.25

# @libit/log

> Lightweight level based logging system.

## Log Level

### How do Levels Works?

A log request of level `p` in a logger with level `q` is enabled if `p >= q`. This rule is at the heart of @libit/log.
It assumes that levels are ordered. For the standard levels, we have `ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF`.
npm package: @libit/pkginfo
Description: An easy way to find and read package json whether from a submodule or the application
Author: Mindary
Latest version: 0.4.2

# @libit/pkginfo

> An easy way to find and read package json whether from a submodule or the application

## Installation

```
$ npm install @libit/pkginfo
```

## Highlights

- Using [pkg-up](https://github.com/sindresorhus/pkg-up) to find package json file
- Read package json file through `fs.readFile` instead of `require` for this
  [issue](https://github.com/webpack/webpack/issues/196)
- Provide `appinfo()` and `appinfo.sync()` function to get application json data directly
- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)
- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)

## Motivation

[How can a module get package data from an application's package.json?](https://stackoverflow.com/questions/16301722/in-node-js-how-can-a-module-get-data-from-an-applications-package-json)

```ts
import {pkginfo} from '@libit/pkginfo';

// get applicaiton json data using pkginfo
console.log(await pkginfo(require.main));
// await pkginfo(require.main);
// =>
// [{"name": "application", ...}, '.../resolved-directory']

// or simply using appfino
console.log(await appinfo());
// await appinfo(require.main);
// =>
// [{"name": "application", ...}, '.../resolved-directory']
```

## Usage

```ts
import {pkginfo} from '@libit/pkginfo';

console.log(await pkginfo());
// => [{name: '@libit/pkginfo', …}, '.../resolved-directory']

console.log(await pkginfo(require.main));
// => [{name: 'app', …}, '.../resolved-directory']

console.log(await pkginfo('some-other-directory'));
// => [{name: 'unicorn', …}, '.../resolved-directory']
```

Here's a sample of the output:

```js
[
  '.../fixtures',
  {
    name: 'simple-app',
    description: 'A test fixture for pkginfo',
    version: '0.1.0',
    keywords: ['test', 'fixture'],
    main: './dist/index.js',
    scripts: {test: 'mocha __tests__/**/*.test.js'},
    engines: {node: '>= 12'},
  },
];
```

## API

### `pkginfo(dirOrModule?: NodeModule | string, normalization?: boolean)`

Returns a `Promise<[PackageJson, string]>` or `Promise<[NormalizePackageJson, string]>` for package data and package
file directory, or Promise<[null, null]> if couldn't be found.

### `pkginfo.sync(dirOrModule?: NodeModule | string, normalization?: boolean)`

Returns a `[PackageJson, string]` or `NormalizePackageJson, string` for package data and package file directory, or
[null, null] if couldn't be found.

### `appinfo(normalization?: boolean)` and `appinfo.sync(normalization?: boolean)`

```ts
appinfo() <=> pkginfo(require.main);
appinfo(false) <=> pkginfo(require.main, false);
```
npm package: @libit/sn
Description: A simple Node.js module for accessing the serial number of the local machine. Supports Linux, Mac (OS X), Windows, and FreeBSD.
Author: Mindary
Latest version: 0.3.2

# @libit/sn

> A simple Node.js module for accessing the serial number of the local machine. Supports Linux, Mac (OS X), Windows, and
> FreeBSD.

## Installation

```bash
npm i @libit/sn
```

## Usage

Retrieve the serial number form system asynchronously.

```ts
import {sn} from '@libit/sn';

const serial = await sn();
console.log(serial);
```

If the serial number turns out to be invalid (common on VMs), the system's UUID value will be provided as a fallback. To
instead try to get the UUID on the first attempt, use `uuid` option:

```ts
const serial = await sn({uuid: true});
```

To prefix the system command with `sudo`, use `sudo` option:

```ts
const serial = await sn({sudo: true});
```

## sn(options)

```ts
async function sn(options: SnOptions = {});
```

Retrieve the serial number form system asynchronously.

**Options**

- `cwd` - The custom current working directory
- `file` - The custom cache file name
- `prefix` - A string to be prefixed ahead of the shell command to be run. Can be used to specify a path to the
  `dmidecode` binary on \*nix systems if it won't be found in the environment \$PATH
- `sudo` - True to prefix the system command with `sudo`. Default is false
- `uuid` - True to instead try to get the UUID on the first attempt. Default is false
- `hash` - True to return the hashed serial number, or pass a custom hash function to digest. Default is false.
- `size` - Slice the serial number to specified size

## setup(options)

In the case that sudo is required to obtain the serial number, call setup to obtain and cache the serial number in
advance so that the serial number can be obtained without sudo in the future.

When the application runs for the first time:

```ts
await setup({...});
```

When the application runs later:

```ts
await sn({...});
```
npm package: @libit/sn-cli
Description: The sn command line tool
Author: Mindary
Latest version: 0.2.10

# @libit/sn-cli

> The sn command line tool

## Installation

```bash
npm i @libit/sn-cli -g
```

## Usage

`@libit/sn-cli` provide `lsn` command and `serum` as alternative command

```bash
  lsn x.x.x — Retrieve the serial number of the local machine

  USAGE
    ▸ sernum  [OPTIONS...]

  OPTIONS

    -c, --cwd <cwd>                      The custom current working directory
    -f, --file <file>                    The custom cache file name
    -d, --hash                           Retrieve the hashed serial number
    -p, --prefix <prefix>                A string to be prefixed ahead of the shell command to
                                         be run
    -s, --size <size>                    Slice the serial number to specified size
    -u, --uuid                           Prefer to retrieve uuid on the first attempt

  GLOBAL OPTIONS

    -h, --help                           Display global help or command-related help.
    -V, --version                        Display version.
    --no-color                           Disable use of colors in output.
    -v, --verbose                        Verbose mode: will also output debug messages.
    --quiet                              Quiet mode - only displays warn and error messages.
    --silent                             Silent mode: does not output anything, giving no
                                         indication of success or failure other than the exit
                                         code.
```

## Example

```bash
> lsn
Q09XL3KBMGH0
```

```bash
> sernum
Q09XL3KBMGH0
```
npm package: @libit/translate
Description: APIs and implementation for globalization
Author: Mindary
Latest version: 0.6.20

# @libit/translate

> APIs and implementation for globalization
>
> This package is initial forked from [boost](https://github.com/milesj/boost)

## Usage

See [docs](https://boostlib.dev/docs/translate) of @boost/translate temporally