open-index/open-npm huggingface dataset:
npm package: @iscindyliu/wx-privacy
Description: -   解决微信隐私协议弹窗
Author: cindy
Latest version: 1.0.0

# @iscondyliu/wx-privacy

-   解决微信隐私协议弹窗

## 1、安装

```sh
npm install @iscondyliu/wx-privacy
# 或
yarn add @iscondyliu/wx-privacy
```

## 2、使用

### 2.1、引入JavaScript

```ts
// app.js 或者 app.ts

import { usePrivacy } from '@iscondyliu/wx-privacy'

usePrivacy({
    title: '瓶子星球隐私保护指引',
    contents: [
        {
            text: '在使用「瓶子星球」服务之前，请仔细阅读',
        },
        {
            text: '《瓶子星球BottlePlanet小程序隐私保护指引》',
            action: 'doOpenPrivacyContract',
            style: { '--text-color': 'red' },
        },
        {
            text: '。如你同意，请点击“同意”开始使用「瓶子星球」。',
        },
    ],
})
```

### 2.2、引入组件

```ts
// app.json
{
  ...
  "usingComponents": {
      "privacy": "@iscondyliu/wx-privacy/privacy/index",
  },
  ...
}
```

### 2.3、使用组件

注意需要写组件`id="privacy"`,如修改,需要同步修改`usePrivacy`第二个参数

```html
<!-- 需要隐私弹窗页面引入 -->

<!-- 隐私协议 -->
<privacy id="privacy" />
```

## 3、API

| 名称                                                 | 说明         |
| ---------------------------------------------------- | ------------ |
| usePrivacy(info: IPrivacyInfo, componentId?: string) | 隐私弹窗内容 |

## 4、options

| 参数        | 必填 | 类型         | 默认      |
| ----------- | ---- | ------------ | --------- |
| info        | 否   | IPrivacyInfo | null      |
| componentId | 否   | string       | 'privacy' |

## 5、types

```ts
type ContentStyle = Record<string, string> | string

interface IContentItem {
    text: string
    className?: string
    action?: string
    style?: ContentStyle | ContentStyle[]
}

interface IPrivacyInfo {
    title: string
    contents: IContentItem[]
}
```

## 组件 `<privacy />`

**组件属性优先级高于`usePrivacy`**

| 属性     | 必填 | 类型   | 说明     | 默认 |
| -------- | ---- | ------ | -------- | ---- |
| id       | 是   | string | 组件ID   | null |
| title    | 否   | string | 协议标题 | null |
| contents | 否   | string | 协议内容 | null |
npm package: @iscv/button
Description: Made with create-react-library
Author: 19521679
Latest version: 1.0.1

# @iscv/button

> Made with create-react-library

[![NPM](https://img.shields.io/npm/v/@iscv/button.svg)](https://www.npmjs.com/package/@iscv/button) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @iscv/button
```

## Usage

```jsx
import React, { Component } from 'react'

import MyComponent from '@iscv/button'
import '@iscv/button/dist/index.css'

class Example extends Component {
  render() {
    return <MyComponent />
  }
}
```

## License

MIT © [19521679](https://github.com/19521679)
npm package: @isdampe/tesseract-ocr
Description: A Node.js wrapper for the Tesseract OCR API
Latest version: 2.2.2

# Tesseract OCR for Node.js

[![Build Status](https://img.shields.io/travis/zapolnoch/node-tesseract-ocr/master.svg?style=flat-square)](https://travis-ci.org/zapolnoch/node-tesseract-ocr)
[![npm](https://img.shields.io/npm/v/node-tesseract-ocr.svg?style=flat-square)](https://www.npmjs.com/package/node-tesseract-ocr)
[![npm](https://img.shields.io/npm/dm/node-tesseract-ocr.svg?style=flat-square)](https://www.npmjs.com/package/node-tesseract-ocr)
[![Known Vulnerabilities](https://snyk.io/test/github/zapolnoch/node-tesseract-ocr/badge.svg)](https://snyk.io/test/github/zapolnoch/node-tesseract-ocr)

## Installation

First, you need to install the Tesseract project. Instructions for installing Tesseract for all platforms can be found on [the project site](https://github.com/tesseract-ocr/tessdoc/blob/master/Installation.md). On Debian/Ubuntu:

```bash
apt-get install tesseract-ocr
```

After you've installed Tesseract, you can go installing the npm-package:

```bash
npm install node-tesseract-ocr
```

## Usage

```js
const tesseract = require("node-tesseract-ocr")

const config = {
  lang: "eng", // default
  oem: 3,
  psm: 3,
}

async function main() {
  try {
    const text = await tesseract.recognize("image.jpg", config)
    console.log("Result:", text)
  } catch (error) {
    console.log(error.message)
  }
}

main()
```

Also you can pass URL:

```js
const img = "https://tesseract.projectnaptha.com/img/eng_bw.png"
const text = await tesseract.recognize(img)
```

or Buffer:

```js
const tesseract = require("node-tesseract-ocr")
const fs = require("fs/promises")

async function main() {
  const img = await fs.readFile("image.jpg")
  const text = await tesseract.recognize(img)

  console.log("Result:", text)
}
```

If you want to process multiple images in a single run, then pass an array:

```js
const images = ["./samples/file1.png", "./samples/file2.png"]
const text = await tesseract.recognize(images)
```

In the config object you can pass any [OCR options](https://github.com/tesseract-ocr/tesseract/blob/master/doc/tesseract.1.asc#options). Also you can pass here any [control parameters](https://tesseract-ocr.github.io/tessdoc/tess3/ControlParams) or use ready-made sets of [config files](https://github.com/tesseract-ocr/tesseract/tree/master/tessdata/configs) (like hocr):

```js
await tesseract.recognize("image.jpg", {
  load_system_dawg: 0,
  tessedit_char_whitelist: "0123456789",
  presets: ["tsv"],
})
```

## Alternatives

If you want to use Tesseract in the browser, choose [Tesseract.js](https://github.com/naptha/tesseract.js) package, which compiles original Tesseract from C to JavaScript WebAssembly. You can also use it in Node.js, but the performance may not be as good.
npm package: @isdenmois/5to6-codemod
Description: A collection of codemods that allow you to transform your js code from ES5 to ES6.
Latest version: 1.7.3

[![Build Status](https://travis-ci.org/5to6/5to6-codemod.svg)](https://travis-ci.org/5to6/5to6-codemod)
[![GitHub version](https://img.shields.io/github/tag/5to6/5to6-codemod.svg)](https://github.com/5to6/5to6-codemod)
[![NPM version](https://img.shields.io/npm/v/5to6-codemod.svg)](https://www.npmjs.com/package/5to6-codemod)
[![Downloads](https://img.shields.io/npm/dm/5to6-codemod.svg)](https://www.npmjs.com/package/5to6-codemod)

# 5to6-codemod

A collection of [codemods](https://medium.com/@cpojer/effective-javascript-codemods-5a6686bb46fb) that allow you to transform your JavaScript code from ES5 to ES6 using [jscodeshift](https://github.com/facebook/jscodeshift).

## Usage

1. `npm install -g jscodeshift`
2. `npm install @isdenmois/5to6-codemod`
3. `jscodeshift -t node_modules/5to6-codemod/transforms/[transform].js [files]`
4. Review changes via `git diff`. Keep what you want, throw it out if you don't. Magic!

## Option flags

When executing codemods, you can configure options like so:

`jscodeshift -t node_modules/5to6-codemod/transforms/[transform].js [files] --key=value`

### Recast options

Our transforms will automatically distinguish and pass through Recast config keys via [jscodeshift](https://github.com/facebook/jscodeshift#passing-options-to-recast). Official documentation for Recast's configuration can be found [here](https://github.com/benjamn/recast/blob/4899a70d4b9aeec9c599065be3338464b7047767/lib/options.js#L1). We currently support the following Recast keys:
- `esprima`
- `inputSourceMap`
- `lineTerminator`
- `quote`
- `range`
- `reuseWhitespace`
- `sourceFileName`
- `sourceMapName`
- `sourceRoot`
- `tabWidth`
- `tolerant`
- `trailingComma`
- `useTabs`
- `wrapColumn`

## Transforms

- `amd` - Transforms AMD style modules to ES6 `import`/`export`
- `cjs` - Transforms CommonJS style `require()` calls to ES6 `import` statements
	- This transformation accepts the following option flags:
		- `hoist`: Enables hoisting require statements to the top
- `no-strict` - Removes "use strict" statements
- `exports` - Move CommonJS style `module.exports` statements to ES6 `export` statements
- `named-export-generation` - Adds named exports corresponding to default export object keys. Only valid for ES6 modules exporting an object as the default export.
- `let` - Replace all `var` calls to use `let`
- `simple-arrow` - Replace all function expressions with a body of a sole return statement into arrow functions

## Known issues

* Can't automagically figure out when you want to use `import * as varName`.
* End-of-line comments also missing in many situations
* `simple-arrow` loses comments in the function expression body
npm package: @isdenmois/amd-to-es6
Description: convert amd to es6
Author: emil@ajdyna.com
Latest version: 0.11.2

# AMD to ES6 converter

[![Codeship](https://img.shields.io/codeship/f6299130-6721-0134-f3f9-02d00f1d3243/master.svg)](https://app.codeship.com/projects/176125)

## Installation

`npm install @isdenmois/amd-to-es6`

If you'd like to use it in the cli consider installing globally or use `npx`

`npm install -g @isdenmois/amd-to-es6`

## Usage

### cli

Convert a single file with:

`amdtoes6 app.js > app-es6.js`

Convert multiple files in given dir with:

`amdtoes6 --src=src --dest=build`

Convert multiple files in given dir recursively with:

`amdtoes6 --src=src --dest=build --glob=**/*.js`

Convert multiple files and replace them with:

`amdtoes6 --src=src --replace`

### node

Convert a single file with:

```javascript
const amdtoes6 = require('@isdenmois/amd-to-es6');
const source = 'define({ hello: 'world' });';
const result = amdtoes6(source); // export default { hello: 'world' };
```

## Examples:

**AMD**

```javascript
define([
    'core/view',
    'subapp/hello/template/layout'
], function (View, template) {
    'use strict';

    return View.extend({
        template: template
    });

});
```

**ES6**

```javascript
import View from 'core/view';
import template from 'subapp/hello/template/layout';

export default View.extend({
    template: template
});
```

**AMD**

```javascript
define(function (require) {
    'use strict';

    var Marionette = require('marionette');

    return Marionette.Object.extend({
        initialize: function () {
            console.log('hello world');
        }
    });
});
```

**ES6**

```javascript
import Marionette from 'marionette';

export default Marionette.Object.extend({
    initialize: function () {
        console.log('hello world');
    }
});
```

There are more examples in the test/fixture directory

### Options
```sh

  Usage: amdtoes6 [options]

  Options:

    -s, --src <dirname>     Directory of the source files
    -d, --dest <dirname>    Directory of the destination files
    -g, --glob [glob]       Glob pattern for the src to match for input files
    -r, --recursive         Set glob pattern to **/*.js with no hassle
    -b, --beautify          Beautify the output
    --replace           Replace the input files with results
    --suffix <string>   Replace suffix of the files
    --side              Import side effects with camel cased named
    --assigned          Automatically assign custom name to side effects
    --quotes            Single, double or auto quotes in the output
    --comments          Basic comments, copy them to the top of the output file

```

## Inspired by:

https://github.com/jonbretman/amd-to-as6
npm package: @isdfs-low-code/db-poetry
Description: A low-code database package providing a collection of classical and modern poetry.
Author: isdfs
Latest version: 0.0.2

# @isdfs-low-code/db-poetry

一个轻量级的诗词数据库库，包含唐朝、宋朝、明朝的经典诗词。该库支持在前端（浏览器）和后端（Node.js）环境中使用，并提供了灵活的接口来查询和扩展诗词数据。

## 功能特性

- **动态加载数据**：根据运行环境自动加载诗词数据，无论是在前端还是后端环境中都能正常工作。
- **支持自定义数据**：用户可以将自己的诗词数据与库中的默认数据合并使用。
- **多种查询方式**：支持按标题、作者、朝代、主题等多种方式查询诗词数据。
- **全文搜索**：支持在诗词内容和标题中进行关键词搜索。

## 安装

通过 npm 安装：

```bash
npm install @isdfs-low-code/db-poetry
```

或使用 Yarn 安装：

```bash
yarn add @isdfs-low-code/db-poetry
```

## 使用

以下是一些基本的使用示例，展示了如何加载和查询诗词数据。

### 合并自定义数据

你可以通过 `mergeData` 方法将自定义数据与默认数据合并使用：

```typescript
import dbPoetry, { mergeData } from '@isdfs-low-code/db-poetry';

// 自定义诗词数据
const customPoems = [
    {
        title: '自定义诗词',
        author: '某作者',
        dynasty: '某朝代',
        content: '自定义诗词内容',
        theme: '自定义主题'
    }
];

// 合并自定义数据
mergeData(customPoems);
```

### 按标题查询诗词

通过 `getPoemByTitle` 方法，根据标题查找诗词：

```typescript
dbPoetry.getPoemByTitle('静夜思').then(poem => console.log(poem));
```

### 按作者查询诗词

通过 `getPoemsByAuthor` 方法，获取某位作者的所有诗词：

```typescript
dbPoetry.getPoemsByAuthor('李白').then(poems => console.log(poems));
```

### 按朝代查询诗词

通过 `getPoemsByDynasty` 方法，按朝代筛选诗词：

```typescript
dbPoetry.getPoemsByDynasty('唐朝').then(poems => console.log(poems));
```

### 按主题查询诗词

通过 `getPoemsByTheme` 方法，根据主题筛选诗词：

```typescript
dbPoetry.getPoemsByTheme('思乡').then(poems => console.log(poems));
```

### 全文搜索诗词

通过 `searchPoemsByContent` 方法，在诗词内容或标题中搜索关键词：

```typescript
dbPoetry.searchPoemsByContent('大漠孤烟直').then(poems => console.log(poems));
```

## API 文档

### `mergeData(customData: any[]): void`

将用户自定义的数据与库中的默认数据合并。传入的数据应包含 `title`, `author`, `dynasty`, `content`, `theme` 等字段。

### `getPoemByTitle(title: string): Promise<any | null>`

根据诗词标题查询对应的诗词。

- `title`: 诗词标题。
- 返回值: 匹配的诗词对象，如果没有找到则返回 `null`。

### `getPoemsByAuthor(author: string): Promise<any[]>`

根据作者姓名查询该作者的所有诗词。

- `author`: 作者姓名。
- 返回值: 该作者的所有诗词数组。

### `getPoemsByDynasty(dynasty: string): Promise<any[]>`

根据朝代名称查询所有属于该朝代的诗词。

- `dynasty`: 朝代名称。
- 返回值: 该朝代的所有诗词数组。

### `getPoemsByTheme(theme: string): Promise<any[]>`

根据主题名称查询所有相关诗词。

- `theme`: 主题名称。
- 返回值: 相关主题的所有诗词数组。

### `searchPoemsByContent(query: string): Promise<any[]>`

在诗词内容或标题中根据关键词进行全文搜索。

- `query`: 搜索关键词或诗句的一部分。
- 返回值: 符合条件的诗词数组。

## 贡献

欢迎对本项目做出贡献！如果你有任何建议、问题或发现了错误，请提交 Issue 或 Pull Request。

## 许可证

本项目基于 MIT 许可证开源，详情请参见 LICENSE 文件。

### 说明

1. **项目简介**：概述了项目的功能特性，帮助用户快速了解库的用途。

2. **安装说明**：提供了使用 npm 或 Yarn 安装库的具体步骤。

3. **使用示例**：详细展示了如何使用该库的不同功能，包括合并自定义数据、按多种条件查询诗词以及全文搜索。

4. **API 文档**：详细列出了库中的主要方法及其用法，帮助用户理解每个方法的功能和参数。

5. **贡献与许可证**：鼓励用户参与项目贡献，并明确了项目的开源许可证。