open-index/open-npm huggingface dataset:
npm package: @16uke.com/plugin-mermaid
Description: ByteMD plugin to support Mermaid diagram
Author: Rongjian Zhang
Latest version: 1.22.1

# @bytemd/plugin-mermaid

[![npm](https://img.shields.io/npm/v/@bytemd/plugin-mermaid.svg)](https://npm.im/@bytemd/plugin-mermaid)

ByteMD plugin to support Mermaid diagram

## Usage

```js
import mermaid from '@bytemd/plugin-mermaid'
import { Editor } from 'bytemd'

new Editor({
  target: document.body,
  props: {
    plugins: [
      mermaid(),
      // ... other plugins
    ],
  },
})
```

## License

MIT
npm package: @171h/log
Description: 封装了 console.log 日志输出
Author: 171H
Latest version: 2.2.0

### install
```ts
npm install @171h/log
```

### usage
```ts
import { Logger } from '@171h/log'
const logger = new Logger("demo.ts");

const fn = () => {
  const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  const obj = { a: 1, b: 2, c: 3, d: 4, e: 5}
  logger.verbose("function name", "start...");
  logger.verbose(fn, "start...");
  logger.verbose(fn, arr);
  logger.verbose(fn, obj);
  logger.verbose(fn, ...arr);
  logger.debug(fn, "start...");
  logger.log(fn, "start...");
  logger.info(fn, "start...");
  logger.warn(fn, "start...");
  logger.error(fn, "start...");
};

fn();
```
// output

![](./assets/Snipaste_2023-04-19_17-32-40.png)


#### 为每个 logger 实例设置日志等级
实例的日志等级优先级高于全局配置文件，下面这个 logger 的日志等级为 debug。
```ts
const logger = new Logger("demo.ts","debug");
```

### 为每个 logger 的不同日志等级设置前缀字符
// 默认配置
```
{ verbo: "✔", debug: "🐛", info: "ℹ", warn: "⚠", error: "✖" }
```
// 你也可以自定义配置
```
const logger = new Logger("demo.ts", "debug", { verbo: "✔", debug: "🐛", info: "✨", warn: "⚠", error: "✖" });
```

### config
- 在项目根目录创建 `log.config.json` 配置日志输出级别，默认 `logLevel` 为 `verbo` 输出所有日志。
- `log.config.json` 配置文件仅在 `1.2.0` 和 `1.3.0` 版本支持，且仅在 `Node.js` 环境可用。

#### 日志等级
`verbo < debug < info/log < warn < error < close`

##### 设置日志级别全局为 debug
大于等于 debug 级别的日志会输出
// log.config.json。`log.config.json` 配置文件仅在 `1.2.0` 和 `1.3.0` 版本支持，且仅在 `Node.js` 环境可用。
```
{
  "logLevel": "debug"
}
```

##### 设置日志级别全局为 close
关闭所有日志输出
// log.config.json
```
{
  "logLevel": "close"
}
```
npm package: @171h/scroll-sync
Description: Scroll synchronization (`scroll-sync`), which associates multiple elements with scroll properties (`overflow: scroll`). When a scroll event occurs in one of the elements, the scroll effect is mapped to all the elements associated with it. To achieve synch
Author: 171h
Latest version: 0.0.1

# Scroll Sync

Scroll synchronization (`scroll-sync`), which associates multiple elements with scroll properties (`overflow: scroll`). When a scroll event occurs in one of the elements, the scroll effect is mapped to all the elements associated with it. To achieve synchronization purposes. `scroll-sync` supports fixed synchronization (`px`) and relative synchronization (`%`).

## Acknowledgements
This is a rewrite of [`scroll-sync`](https://github.com/kiccer/scroll-sync) with `typescript` and added some new features liking scroll-sync only by x or y.

## INSTALL

```shell
npm install @171h/scroll-sync
```

## USAGE

```js
import ScrollSync from 'scroll-sync'

const ss = new ScrollSync({
  disabled: false, // [Boolean] Default value, allow to be empty.
  relative: true, // [Boolean] Default value, allow to be empty.
  doms: document.querySelectorAll('.scroll-container') // [Array] These elements must set scroll attributes.
})

// do sth....
// You can also find another opportunity to set related elements after instantiating the object.
ss.set(document.querySelectorAll('.scroll-container'))

// Or add or delete.
// ss.add([elements])
// ss.remove([elements])

// You can also actively clear the listener event and clear the cache.
// ss.clear()
```

### API
##### .add()
// add elements to scroll-sync.
```js
ss.add(document.documentElement)
// or use array.
ss.add(document.querySelectorAll('.other-scroll-container'))
```

#### .remove()
// remove elements to scroll-sync.
```js
ss.remove(document.documentElement)
// or use array.
ss.remove(document.querySelectorAll('.other-scroll-container'))
```

#### .set()
// reset elements to scroll-sync.
```js
ss.set(document.documentElement)
// or use array.
ss.set(document.querySelectorAll('.other-scroll-container'))
```

#### .clear()
// reset elements to scroll-sync.
```js
ss.clear()
```


## DOCUMENT
[Please click here for an online experience. (中文)](https://kiccer.github.io/scroll-sync/)