open-index/open-npm huggingface dataset:
npm package: @lidqqq/pipe
Description: A function to create piped function
Author: lidqqq
Latest version: 1.0.5

# @lidqqq/pipe

A type safety function to create a pipeline

## Installation

```
npm i @lidqqq/pipe
```

## Usage

### TypeScript

```typescript
// Async
import { pipe } from '@lidqqq/pipe';

async function plus2(n: number): Promise<number> {
  return n + 2;
}
async function n2s(n: number): Promise<string> {
  return n.toString();
}

const main = pipe<typeof plus2, typeof n2s>(plus2, n2s);

(async () => {
  console.log((await main(2)) === '4'); // true
})();
```

```typescript
// Synchronously
import { pipeSync } from '@lidqqq/pipe';

function plus2(a: number) {
  return a + 2;
}
function n2s(a: number): string {
  return a.toString();
}

const main = pipeSync<typeof plus2, typeof n2s>(plus2, n2s);
console.log(main(42) === '44'); // true
```

### JavaScript

```js
// ESM
import { pipe } from '@lidqqq/pipe';
// CJS
const { pipe } = require('@lidqqq/pipe');
```

## Type safety

![](assets/type-safe.png)
npm package: @lidxgz/v-md-editor
Description: A markdown editor built on Vue
Latest version: 2.3.8-beta.1

<h1 align="center">Markdown Editor built on Vue</h1>

<p align="center">
  <a href="https://npmcharts.com/compare/@kangc/v-md-editor?minimal=true"><img src="https://img.shields.io/npm/dm/@kangc/v-md-editor.svg?sanitize=true" alt="Downloads"></a>
  <a href="https://www.npmjs.com/package/@kangc/v-md-editor"><img src="https://img.shields.io/npm/v/@kangc/v-md-editor.svg?sanitize=true" alt="Version"></a>
  <a href="https://www.npmjs.com/package/@kangc/v-md-editor"><img src="https://img.shields.io/npm/l/@kangc/v-md-editor.svg?sanitize=true" alt="License"></a>
</p>

## Links

- [Demo](https://code-farmer-i.github.io/vue-markdown-editor/examples/base-editor.html)
- [Documentation](https://code-farmer-i.github.io/vue-markdown-editor/)
- [中文文档](https://code-farmer-i.github.io/vue-markdown-editor/zh/)
- [国内文档镜像](http://ckang_1229.gitee.io/vue-markdown-editor/zh/)
- [Changelog](https://code-farmer-i.github.io/vue-markdown-editor/changelog.html)

## Communication

qq group: 798884474

## Install

```bash
# use npm
npm i @kangc/v-md-editor -S

# use yarn
yarn add @kangc/v-md-editor
```

## Quick Start

```js
import Vue from 'vue';
import VueMarkdownEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

VueMarkdownEditor.use(vuepressTheme);

Vue.use(VueMarkdownEditor);
```

## Usage

```html
<template>
  <v-md-editor v-model="text" height="400px"></v-md-editor>
</template>

<script>
  export default {
    data() {
      return {
        text: '',
      };
    },
  };
</script>
```

## Refrence

- [ElementUi Utils clickoutside](https://github.com/ElemeFE/element/blob/dev/src/utils/clickoutside.js)
- [ElementUi Utils resize-event](https://github.com/ElemeFE/element/blob/dev/src/utils/resize-event.js)
- [ElementUi Utils scrollbar-width](https://github.com/ElemeFE/element/blob/dev/src/utils/scrollbar-width.js)
- [ElementUi Scrollbar Component](https://github.com/ElemeFE/element/tree/dev/packages/scrollbar)
- [vuepress-plugin-container](https://github.com/vuepress/vuepress-community/blob/master/packages/vuepress-plugin-container/src/markdown-it-container.ts)
- [vuepress markdown preWrapper](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/markdown/lib/preWrapper.js)
- [vuepress markdown link](https://github.com/vuejs/vuepress/blob/master/packages/%40vuepress/markdown/lib/link.js)
- [markdown-it-katex](https://github.com/waylonflinn/markdown-it-katex/blob/master/index.js)
- [markdown-it-table-of-contents](https://github.com/Oktavilla/markdown-it-table-of-contents/blob/master/index.js)
- [markdown-it-task-lists](https://github.com/revin/markdown-it-task-lists/blob/master/index.js)

## License

[MIT](https://github.com/code-farmer-i/vue-markdown-editor/blob/dev/LICENSE)