open-index/open-npm huggingface dataset:
npm package: @gyugyu/array-map-sass
Description: Array#map implementation for Dart Sass
Author: Yusuke Yagyu
Latest version: 0.1.0

# array-map-sass
Array#map implementation for Dart Sass

## Installation

```
$ npm install @gyugyu/array-map-sass
```

## Example

```scss
@use '@gyugyu/array-map-sass' as array-map;

@function foo($str) {
  @return $str + '-foo';
}

$foo: meta.get-function('foo');
$array: 'a', 'b', 'c';
$result: array-map.map($array, $foo); // 'a-foo', 'b-foo', 'c-foo'
```
npm package: @gyugyu/assert-sass
Description: Assertion function library for Dart Sass
Author: Yusuke Yagyu
Latest version: 0.1.2

# assert-sass
Assertion function library for Dart Sass

## Installation

```
$ npm install @gyugyu/assert-sass sass
```

## Example

```scss
@use '@gyugyu/assert-sass' as assert;

@function sum($a, $b) {
  @return $a + $b;
}

$result: assert.equals(sum(2, 3), 5);
```

## API

* `assert.equals($expected, $actual)`
* `assert.not-null($value)`
* `assert.contains-all-keys($map, $keys)`
npm package: @gyugyu/googleapi-issuer
Description: Google API token issueing CLI
Author: Yusuke YAGYU
Latest version: 2.0.0

# googleapi-issuer

Google API token issueing CLI

## Install

Install with [npm](https://www.npmjs.com/)

```sh
$ npm i -g @gyugyu/googleapi-issuer
```

## CLI

From the command line, run:

```sh
$ issue-googleapi 'https://www.googleapis.com/auth/drive.file' # example, drive.file scope
$ issue-googleapi 'https://www.googleapis.com/auth/drive.file' -d dir -o dir # with read/output dir
```

## Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/gyugyu/googleapi-issuer/issues)

## Author

**Yusuke YAGYU**

* [github/gyugyu](https://github.com/gyugyu)

## License

Copyright © 2019 [Yusuke YAGYU](https://github.com/gyugyu)
Licensed under the MIT license.
npm package: @gyugyu/map-pick-sass
Description: Picking key, value from map value (Dart Sass module)
Author: Yusuke Yagyu
Latest version: 0.1.0

# map-pick-sass
Picking key, value from map value (Dart Sass module)

## Installation

```
$ npm install @gyugyu/map-pick-sass
```

## Example

```scss
@use '@gyugyu/map-pick-sass' as map-pick;

$map: (a: 1, b: 'foo', c: true);
$paths: a c;
$result: map-pick.pick($map, $paths); // (a: 1, c: true)
```
npm package: @gyugyu/markuplint-md-parser
Description: Markdown parser for markuplint
Author: Yusuke Yagyu
Latest version: 0.1.0

# markuplint-md-parser
Markdown parser for markuplint

## Installation

```bash
$ npm install -D @gyugyu/markuplint-md-parser

$ yarn add -D @gyugyu/markuplint-md-parser

$ pnpm add -D @gyugyu/markuplint-md-parser
```

## Usage

```json
{
  "parser": {
    "\\.md$": "@gyugyu/markuplint-md-parser"
  }
}
```
npm package: @gyugyu/rollup-plugin-node-polyfills
Description: rollup-plugin-node-polyfills ===
Latest version: 0.2.2-0

rollup-plugin-node-polyfills
===

```
npm install --save-dev rollup-plugin-node-polyfills
```

Allows the node builtins to be `require`d/`import`ed.

The following modules include ES6 specific version which allow you to do named imports in addition to the default import and should work fine if you only use this plugin.

- process*
- events
- stream*
- util*
- path
- buffer*
- querystring
- url*
- string_decoder*
- punycode
- http*†
- https*†
- os*
- assert*
- constants
- timers*
- console*‡
- vm*§
- zlib*
- tty
- domain
- dns∆
- dgram∆
- child_process∆
- cluster∆
- module∆
- net∆
- readline∆
- repl∆
- tls∆
- fs˚
- crypto˚


† the http and https modules are actually the same and don't differentiate based on protocol

‡ default export only, because it's console, seriously just use the global

§ vm does not have all corner cases and has less of them in a web worker

∆ not shimmed, just returns mock

˚ optional, add option to enable browserified shim

Crypto is not shimmed and and we just provide the commonjs one from browserify  and it will likely not work, if you really want it please pass `{crypto: true}` as an option.

Not all included modules rollup equally, streams (and by extension anything that requires it like http) are a mess of circular references that are pretty much impossible to tree-shake out, similarly url methods are actually a shortcut to a url object so those methods don't tree shake out very well, punycode, path, querystring, events, util, and process tree shake very well especially if you do named imports.

config for using this with something simple like events or querystring

```js
import nodePolyfills from 'rollup-plugin-node-polyfills';
rollup({
  entry: 'main.js',
  plugins: [
    nodePolyfills()
  ]
})
```

and now if main contains this, it should just work

```js
import EventEmitter from 'events';
import {inherits} from 'util';

// etc
```

Config for something more complicated like http

```js
import nodePolyfills from 'rollup-plugin-node-polyfills';
rollup({
  entry: 'main.js',
  plugins: [
    nodePolyfills()
  ]
})
```

License
===

MIT except ES6 ports of browserify modules which are whatever the original library was.
npm package: @gyugyu/sassunit
Description: Unit testing framework for Dart Sass
Author: Yusuke Yagyu
Latest version: 0.2.0

# sassunit
Unit testing framework for Dart Sass

## Installation

```bash
npm install @gyugyu/sassunit @gyugyu/assert-sass sass
```

## Example

```scss
@function sum($a, $b) {
  @return $a + $b;
}
```

```scss
@use 'functions';
@use '@gyugyu/assert-sass' as assert;

@function test-sum() {
  $ret: assert.equals(functions.sum(2, 3), 5);
  @return $ret;
}
```

```bash
npx sassunit
```

## Watch mode

From v0.2.0, watch mode is added.

```bash
npx sassunit src --watch
```
npm package: @gyugyu/textlint-plugin-yaml
Description: for yaml style resource supoprt for textlint
Author: Yusuke Yagyu
Latest version: 0.1.2

# textlint-plugin-yaml
for yaml style resource supoprt for textlint

## Installation

```
npm install -g textlint-plugin-yaml@npm:@gyugyu/textlint-plugin-yaml
```

## Usage

add plugin to your ``.textlintrc``

```
{
  "plugins": [
    "yaml"
  ]
}
```

execute textlint

```
textlint config/locales/**/*.yml
```

## Build

```
npm install
babel -s -d lib src
```
npm package: @gyugyu/uxboard-core
Description: 📋 UX achivement visualization tool
Author: gyugyu
Latest version: 1.0.0

# uxboard-core
📋 UX achivement visualization tool

## Requirements

* Node (>= 8.0.0)

## Installation

### Using yarnpkg

```bash
$ yarn global add create-react-app
$ create-react-app your-app-name
$ cd your-app-name
$ yarn add @material-ui/core @material-ui/icons firebase react-dnd react-dnd-html5-backend
$ yarn add @gyugyu/uxboard-core
$ cat << EOS
{
  "databasePrefix": "uxboard",
  "firebase": {
    "apiKey": "yourFirebaseApiKey",
    "authDomain": "your-auth-domain.firebaseapp.com",
    "databaseURL": "https://your-database-url.firebaseio.com"
  }
}
EOS > src/uxboard.json
$ node_modules/.bin/uxboardify ./src/uxboard.json
```

### Using npm

```bash
$ npm install -g create-react-app
$ create-react-app your-app-name
$ cd your-app-name
$ npm install -s @material-ui/core @material-ui/icons firebase react-dnd react-dnd-html5-backend
$ npm install -s @gyugyu/uxboard-core
$ cat << EOS
{
  "databasePrefix": "uxboard",
  "firebase": {
    "apiKey": "yourFirebaseApiKey",
    "authDomain": "your-auth-domain.firebaseapp.com",
    "databaseURL": "https://your-database-url.firebaseio.com"
  }
}
EOS > src/uxboard.json
$ node_modules/.bin/uxboardify ./src/uxboard.json
```

## Usage

### index.js

```js
import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/database';
import React from 'react';
import ReactDOM from 'react-dom';
import FirebaseContext from 'uxboard-core/firebase/FirebaseContext';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import config from './uxboard.json'

firebase.initializeApp(config.firebase)
const authProvider = new firebase.auth.GoogleAuthProvider()
authProvider.setCustomParameters({ hd: 'pepabo.com' })

ReactDOM.render(
  <FirebaseContext.Provider
    value={{
      authProvider,
      databasePrefix: config.databasePrefix,
      firebase
    }}
  >
    <App />
  </FirebaseContext.Provider>, document.getElementById('root'));
registerServiceWorker();
```

### App.js

```js
import React, { Component, Fragment } from 'react';
import AddDimensionButton from 'uxboard-core/AddDimensionButton';
import AppBar from 'uxboard-core/AppBar'; // optional
import UxBoard from 'uxboard-core/UxBoard';

class App extends Component {
  render() {
    return (
      <Fragment>
        <AppBar title='UX Board' />
        <UxBoard />
        <AddDimensionButton />
      </Fragment>
    );
  }
}

export default App;
```

Then `npm(yarn) start`.

## Publish

### GitHub Pages

Add your GitHub Pages URL to `"homepage"` at package.json. Then,

```bash
$ yarn add -D gh-pages
$ yarn build
$ node_modules/.bin/gh-pages -d build

# or

$ npm install -D gh-pages
$ npm run build
$ node_modules/.bin/gh-pages -d build
```
npm package: @gyumeijie/get-type-of
Description: get the type of a javascript value
Author: gyumeijie
Latest version: 1.0.1

# getTypeOf [![](https://travis-ci.com/Gyumeijie/getTypeOf.svg?branch=master)](https://travis-ci.com/Gyumeijie/getTypeOf)

> get the type of a javascript value

## Install

```bash
$ npm install @gyumeijie/get-type-of
```

## API

```typescript
getTypeOf(obj: any, detail?: boolean, typeCase?: string): string
```
obj: 
> object to get type of

detail: 
> get the more detailed information about the type, mainly for customized types, 
> the default value is **false**

typeCase: 
> set the case of the output type string, the default value is ***lower***

## Usage

```js
const getTypeOf = require('@gyumeijie/get-type-of');

// get the type of built-in types

getTypeOf(undefined)   //'undefined'
getTypeOf(null)   //'null'
getTypeOf(1)   //'number'
getTypeOf('this is a string')   //'string'
getTypeOf(true)   //'boolean'
getTypeOf(Symbol())   //'symbol'
getTypeOf({})   //'object'
getTypeOf([1, 2, 3])   //'array'
getTypeOf(() => {})   //'function'
getTypeOf(Object.create(null))   //'object'
getTypeOf(Object.create(null), true)   //'object'
getTypeOf(new Date())   //'date'
getTypeOf(/regexp/)   //'regexp'

// get the type of the customized types
class Custom {
  constructor() {
    this.name = 'custom';
  }
}
getTypeOf(new Custom()); //'object';
getTypeOf(new Custom(), true); //'custom';

function Foo() {
  this.name = 'foo';
}
getTypeOf(new Foo()); //'object';
getTypeOf(new Foo(), true); //'foo';
```

## License

MIT © [Gyumeijie](https://github.com/Gyumeijie)
npm package: @gyumeijie/is-array-like
Description: check whether an object is an array-like object
Author: gyumeijie
Latest version: 1.1.1

# isArrayLike [![](https://travis-ci.com/Gyumeijie/isArrayLike.svg?branch=master)](https://travis-ci.com/Gyumeijie/isArrayLike)

> check whether an object is an array-like object

## Install

```bash
$ npm install @gyumeijie/is-array-like
```

## API

```typescript
isArrayLike(obj: any, similarity?: number): boolean
```

obj:

```
the object to be tested
```

similarity:

```
measure how much the obj is similar to the array object, there are three levels: 0, 1, 2:

0: return true iff obj has a valid `length` property, this is the default setting

1: return true iff obj has a valid `length` property and properties: [0, ..., length-1]

2: return true iff obj has and only has a valid `length` property and properties: [0, ..., length-1],
obj as such also called `strict array-like object`
```

### strict array-like object

> a strict array-like object can be safely converted to array using `Array.from` method

```javascript
let obj;

obj = {
  0: 'zero',
  2: 'two',
  3: 'three',
  length: 3,
};
Array.from(obj);
// ["zero", undefined, "two"]  => missing one value, not safe

obj = {
  0: 'zero',
  2: 'two',
  3: 'three',
  length: -3,
};
Array.from(obj);
// []  => missing all values, not safe

obj = {
  zero: 0,
  one: 1,
  two: 2,
  length: 3,
};
Array.from(obj);
// [undefined, undefined, undefined] => missing all values, not safe

obj = {
  0: 'zero',
  1: 'one',
  2: 'two',
  name: 'obj',
  length: 3,
};
Array.from(obj);
// ["zero", "one", "two"]  => missing `name` property, not safe

obj = {
  0: 'zero',
  1: 'one',
  2: 'two',
  length: 3,
};
Array.from(obj);
//  ["zero", "one", "two"]   => containing all values, safely
```

## Usage

```js
const isArrayLike = require('@gyumeijie/is-array-like');

// test truly array
isArrayLike([]); // true
isArrayLike([1, 2, 3, 4]); // true

// test non-array object
isArrayLike({}); // false
isArrayLike(1); // false
isArrayLike('string'); // false
isArrayLike(undefined); // false
isArrayLike(null); // false
isArrayLike(new Date()); // false

let fn = (arg1, arg2) => {};
isArrayLike(fn); // false

let re = /regexp/;
re.length = 1;
re[0] = 'zero';
isArrayLike(re); // false

let obj = {
  0: 'zero',
  2: 'two',
  3: 'three',
  length: 3,
};
isArrayLike(obj); // true
isArrayLike(obj, 1); // false

obj = {
  0: 'zero',
  1: 'one',
  2: 'two',
  length: 3,
};
isArrayLike(obj); // true
isArrayLike(obj, 1); // true

obj = {
  zero: 0,
  one: 1,
  two: 2,
  length: 3,
};
isArrayLike(obj); //true
isArrayLike(obj, 1); //false

obj = {
  0: 'zero',
  1: 'one',
  2: 'two',
  length: -3,
};
isArrayLike(obj); //false
isArrayLike(obj, 1); //false

obj = {
  0: 'zero',
  1: 'one',
  2: 'two',
  name: 'obj',
  length: 3,
};
isArrayLike(obj); //true
isArrayLike(obj, 1); //true
isArrayLike(obj, 2); //false
```

## License

MIT © [Gyumeijie](https://github.com/Gyumeijie)
npm package: @gyumeijie/is-pojo
Description: check whether an object is a Plain Javascript Object
Author: gyumeijie
Latest version: 1.0.2

# isPOJO [![](https://travis-ci.com/Gyumeijie/isPOJO.svg?branch=master)](https://travis-ci.com/Gyumeijie/isPOJO)

> check whether an object is a Plain Javascript Object

## Install

```bash
$ npm install @gyumeijie/is-pojo
```

## Usage

```js
const isPlainObject = require('@gyumeijie/is-pojo');

isPlainObject({})  //true
isPlainObject(Object.create(null))  //true
isPlainObject(Object.create(Object.prototype))  //true
isPlainObject({ constructor: function Foo() {} })  //true
isPlainObject(Object.create({}))  //false
isPlainObject('string')  //false
isPlainObject(undefined)  //false
isPlainObject(1)  //false
isPlainObject(() => {})  //false
isPlainObject([])  //false
isPlainObject([1, 2, 3, 4])  //false
isPlainObject(new Date())  //false
isPlainObject(/regexp/)  //false
```

## License

MIT © [Gyumeijie](https://github.com/Gyumeijie)
npm package: @gyumeijie/jsoc
Description: clone a javascript object
Author: gyumeijie
Latest version: 1.1.0

# jsoc [![](https://travis-ci.com/Gyumeijie/jsoc.svg?branch=master)](https://travis-ci.com/Gyumeijie/jsoc)

> Clone or Copy a JavaScript Object.

## Install

```bash
$ npm install @gyumeijie/jsoc
```

## Usage

```js
const clone = require('@gyumeijie/jsoc');

let a = { foo: { bar: 'baz' } };

let b = clone(a);
a.foo.bar = 'foo';

console.log(a); // { foo: { bar: 'foo' } }
console.log(b); // { foo: { bar: 'baz' } }
```

## License

MIT © [Gyumeijie](https://github.com/Gyumeijie)
npm package: @gyumeijie/put
Description: pictures uploading tool
Author: gyumeijie
Latest version: 1.0.1

# put [![](https://travis-ci.com/Gyumeijie/put.svg?branch=master)](https://travis-ci.com/Gyumeijie/put)

> **p**ictures **u**ploading **t**ool

**put** allows you uploading pictures assets without downloading the whole repository, especially when the repository has a big size.

## Install

```bash
$ npm install @gyumeijie/put
```

## Usage

```bash
$ put ./YuMeiJie.jpeg
```

## Config

> Put the following content to the `~/.putrc` file

```json
{
  "github": {
    "branch": "branch_name",
    "owner": "user_name",
    "path": "path",
    "repo": "repo",
    "token": "personal_access_token"
  }
}
```
And take `https://github.com/Gyumeijie/put` for examples:

```json
{
  "github": {
    "branch": "master",
    "owner": "Gyumeijie",
    "path": "assets",
    "repo": "put",
    "token": "06aed0df73r8ed1t2914d08da776148d2f350059"
  }
}
```
With all things ready, running the following command:

```bash
$ put ./YuMeiJie.jpeg

https://raw.githubusercontent.com/Gyumeijie/put/master/assets/YuMeiJie.jpeg
```

For how to create a **personal access token** to access the `GitHub API`, please visit [here](https://github.com/settings/tokens).

## License

MIT © [Gyumeijie](https://github.com/Gyumeijie)
npm package: @gyyxds/gyy-web-components
Description: Esbuild + Typescript + Vue3.0组件库模板
Author: lyc
Latest version: 0.7.8

# Esbuild + Typescript + Vue3.0 组件库模板

## 功能介绍

- typescript
- esbuild 打包编译
- eslint 代码规范检查
- sass，postcss 预处理
- browserSync 本地开发服务

## 开发指南

安装依赖

```
npm install
# or
yarn
```

本地开发

```
npm run dev
# or
yarn dev
```

生产打包

```
npm run build
# or
yarn build
```

推送

```
npm publish
# or
yarn publish
```

## 目录结构

```
...
packages --------------- 组件库源码
 - components ---------- 组件目录
  - Button ------------- 组件目录
   - index.ts ---------- 组件注册入口
   - src --------------- 组件源码
 - index.ts ----------- 组件库打包入口文件
examples -------------- 开发预览页面源码
 - main.ts ------------ 预览页入口文件
 - App.vue ------------ 预览页入口组件
 - index.html --------- 预览页htlm模板
types ----------------- ts注解文件目录
.editorconfig --------- 编辑器配置文件
.eslintignore --------- eslint检查忽略目录
.eslintrc ------------- eslint检查配置文件
esbuild.config.js ------ esbuild配置文件
tsconfig.json --------- ts编译配置文件
components.js --------- 单组件映射表
...
```
npm package: @gzaripov/injectify
Description: Add require helper to handlebars for browserify
Author: Evgeny Shpilevsky
Latest version: 2.3.5

Injectify [![Build Status](https://travis-ci.org/ftdebugger/injectify.svg?branch=master)](https://travis-ci.org/ftdebugger/injectify) ![npm downloads](https://img.shields.io/npm/dm/injectify.svg "npm downloads")
=========

Inspired by [hbsfy](https://github.com/epeli/node-hbsfy) and based on it source code.

Transform handlebars AST and add support of `require` helper for browserify/webpack automatic injection;


Install
-------

```
npm install --save-dev injectify
```


Use with browserify
-------------------

Use it as Browserify transform module with `-t`:

```
browserify -t injectify main.js > bundle.js
```

If you prefer `gulp`:

```js
var gulp = require("gulp"),
    browserify = require("browserify"),
    source = require("vinyl-source-stream"),
    
gulp.task('js', function () {
    var bundleStream = browserify('./src/main.js')
        .transform(require("injectify"))
        .bundle();

    return bundleStream
        .pipe(source('main.js'))
        .pipe(gulp.dest('dist'));
});
```

Use with webpack
----------------

Configure webpack

```js
{
    "module": {
        "loaders": [
            {"test": /\.hbs/, "loader": "injectify"}
        ]
    }
}
```

Load helper
-----------

In file `./src/main.js` require injectify `require` helper:

```js
require("injectify/require");
```

Now you can use `require` helper in your templates:

```handlebars
Simple require some module with string export: 

{{require "../string-module"}}

Pass require result as param to another helper: 

{{formatUser (require "../user-module")}}

Pass require result as hash param to another helper: 

{{formatUser user=(require "../user-module")}}
```

`require` helper works like original `browserify`. You can require modules relative to template file or
node_modules directory


```handlebars
Relative require {{require "../utils/strange-module"}} 

or globally defined {{require "my-utils"}}
```

Examples of usage
-----------------

 * [Include helper](https://github.com/ftdebugger/injectify-include) - allow include templates like partials, but with browserify
 * [View helper](https://github.com/ftdebugger/injectify-view) - allow render marionette view direct to template

Changelog
---------

### v2.2.0
 
 * Handlebars 4.0 support
npm package: @gzbapp/icons9
Description: 与 icons 包不同但是，icons9 意为 GZB9 的配套图标规范，使用的是字符图标。
Latest version: 1.0.8

# 基于 GZBIX 规范封装的图标组件

与 icons 包不同但是，icons9 意为 GZB9 的配套图标规范，使用的是字符图标。

字符在 https://www.axureux.com/FontAwesome/pro.html 上面直接复制，或者在 demo 上直接复制

用法

```
import Icon, { IconType } from '@gzbapp/icons9'
<Icon></Icon>
<Icon type={IconType.Solid}></Icon>
```
npm package: @gzbapp/sdk
Description: gzb jssdk
Latest version: 0.1.45

# JSSDK

# 2023.11.20 更新日志 [SDK] [0.1.28]
### 1. GZB9 全面使用jmRpc标准(jsonrpc协议)进行通信，目录：sdk/jmrpc，暂时不会删除8的标准，两边SDK同步维护，直到9全面替代8
### 2. bridge.ts 兼容8/9两个版本，具体区别为8版本 PC方法名称注入了On开头方法名的补丁，9版本移除此规范
### 3. 8版本兼容jsonrpc协议(rpc.ts)和非jsonrpc协议(legacy/index.ts)，将在9版本完成后移除这两个规范

# 2023.11.23 更新日志 [SDK] [0.1.28-beta4]
### 1. 加入jmCallHandlerLoop机制，内部进行递归注册业务层传入的cb回调函数（为何加入此机制？因为addListener需要固定、不变的方法名进行回调映射，由于业务的多变性，无法使用标准的addListener机制）
### 2. 抽离rpc.ts内的type => rpc-type.ts，GZB8和GZB9共享此JSONRPC协议标准，如要修改，尽量兼容，直到废弃GZB8
npm package: @gzbapp/user-selector
Description: jm web user-selector
Latest version: 0.0.3-beta4

# 用于非工作宝环境的通用选人组件

tab:
[] 组织架构
[x] 我的群组 不支持
[] 值班表
[] 其他单位
[] 自定义结构（审批组/接收组）
[] 外线号码

search:
[] 用户
[x] 我的群组 不支持
npm package: @gzdv/bun-kvstore
Description: Bun simple KV using SQLite
Author: gzdv
Latest version: 1.0.1


# Bun KVStore

KVStore is a simple key-value store implementation using bun SQLite, designed for easy storage and retrieval of data in a structured format.

## Installation

To install the KVStore package, you can use npm or yarn. Run the following command in your project directory:

```bash
bun install bun-kvstore
```

## Usage

### Importing the KVStore

First, import the `KVStore` class into your project:

```typescript
import { KVStore } from 'bun-kvstore';
```

### Creating an Instance

Create an instance of the `KVStore` by providing a database name:
If empty, the database will be created in the memory.

```typescript
const store = new KVStore('my-database.db');
```


### Setting a Value

You can set a key-value pair using the `set` method:

```typescript
await store.set('myKey', { name: 'John Doe', age: 30 });
```

### Getting a Value

To retrieve a value by its key, use the `get` method:

```typescript
const value = await store.get('myKey');
console.log(value); // Output: { name: 'John Doe', age: 30 }
```

### Deleting a Value

To delete a key-value pair, use the `delete` method:

```typescript
await store.delete('myKey');
```

### Listing All Key-Value Pairs

You can list all key-value pairs stored in the database:

```typescript
const allEntries = await store.list();
console.log(allEntries); // Output: [{ key: 'myKey', value: { name: 'John Doe', age: 30 } }, ...]
```

### Clearing All Key-Value Pairs

To clear all entries in the store, use the `clear` method:

```typescript
await store.clear();
```

### Batch Operations

You can set multiple key-value pairs at once using `batchSet`:

```typescript
await store.batchSet([
  { key: 'key1', value: 'value1' },
  { key: 'key2', value: { data: 'value2' } },
]);
```

And delete multiple keys using `batchDelete`:

```typescript
await store.batchDelete(['key1', 'key2']);
```

## API Documentation

### `KVStore`

#### Constructor

- `constructor(dbName: string)`: Initializes a new instance of the KVStore with the specified database name.

#### Methods

- `set(key: string, value: KVStoreValue): Promise<void>`: Sets a key-value pair in the store.
- `get(key: string): Promise<KVStoreValue | null>`: Retrieves the value associated with the specified key.
- `delete(key: string): Promise<void>`: Deletes the key-value pair associated with the specified key.
- `list(): Promise<{ key: string; value: KVStoreValue }[]>`: Returns an array of all key-value pairs in the store.
- `clear(): Promise<void>`: Clears all key-value pairs from the store.
- `batchSet(entries: { key: string; value: KVStoreValue }[]): Promise<void>`: Sets multiple key-value pairs in the store.
- `batchDelete(keys: string[]): Promise<void>`: Deletes multiple key-value pairs from the store.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
npm package: @gzeoneth/hardhat
Description: Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
Author: Nomic Labs LLC
Latest version: 2.10.2-gzeon-e972f1dda

![](https://user-images.githubusercontent.com/176499/96893278-ebc67580-1460-11eb-9530-d5df3a3d65d0.png) [![NPM Package](https://img.shields.io/npm/v/hardhat.svg?style=flat-square)](https://www.npmjs.org/package/hardhat) [![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/NomicFoundation/hardhat/badge)](https://www.gitpoap.io/gh/NomicFoundation/hardhat)

---

Hardhat is an Ethereum development environment for professionals. It facilitates performing frequent tasks, such as running tests, automatically checking code for mistakes or interacting with a smart contract. Check out the [plugin list](https://hardhat.org/plugins/) to use it with your existing tools.

Built by the [Nomic Foundation](https://nomic.foundation/) for the Ethereum community.

Join our [Hardhat Support Discord server](https://hardhat.org/discord) to stay up to date on new releases, plugins and tutorials.

## Installation

To install Hardhat, go to an empty folder, initialize an `npm` project (i.e. `npm init`), and run

```
npm install --save-dev hardhat
```

Once it's installed, just run this command and follow its instructions:

```
npx hardhat
```

## Documentation

On [Hardhat's website](https://hardhat.org) you will find:

- [Guides to get started](https://hardhat.org/getting-started/)
- [Hardhat Network](https://hardhat.org/hardhat-network/)
- [Plugin list](https://hardhat.org/plugins/)

## Contributing

Contributions are always welcome! Feel free to open any issue or send a pull request.

Go to [CONTRIBUTING.md](./CONTRIBUTING.md) to learn about how to set up Hardhat's development environment.

## Feedback, help and news

[Hardhat Support Discord server](https://hardhat.org/discord): for questions and feedback.

[Follow Hardhat on Twitter.](https://twitter.com/HardhatHQ)

## Happy building!

👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️
npm package: @gzhu-automation/health-clock-in
Description: 自动健康打卡
Author: Plasticine
Latest version: 1.0.11

# @gzhu-automation/health-clock-in

> 广州大学自动健康打卡

核心实现是使用`Google`的`Puppeteer`库完成，配合`Github Actions`能够每天自动完成打卡

# Usage

## 1. 通过 Github Actions 自动运行

1. `Fork`本项目(顺便点个 Star 呗~)
2. 点击项目的`Settings`选项，进入`Secrets`的`Actions`面板
3. 点击`New repository secret`
4. `Name`填写`GZHU_USERNAME`，`Secret`则为你的学号，填写完毕后点击`Add secret`完成保存
5. 同理，再添加一个键为`GZHU_PASSWORD`，值为你的数字广大密码的`Secret`即可

> PS: 不用担心学号密码泄露问题，因为数据都是由`github`管理，当然，如果你不放心的话可以不用

完成上述配置后就大功告成啦，每天早上`9:00`会准时自动打卡

如果需要更改打卡时间的话可以修改`.github/workflows/clock-in-every-day.yml`中的`on.schedule.cron`的值，按照`crontab`的语法配置运行时间

如果遇到数字广大登录不进去的问题的话则说明是`github`无法访问广大的网络，这个时候就需要换一种方式去运行了

## 2. 通过服务器运行

本项目已发布到`npm`上，可以在你的服务器中安装`@gzhu-automation/health-clock-in`这个包来运行，配置好环境变量后直接导入该包中的`run`函数执行即可，配合服务器上设置定时任务即可实现每日自动打卡

可以安装`dotenv`，然后在`.env`文件中声明好环境变量后通过如下方式运行

```shell
node -r dotenv/config example/run.js
```

# Environment Variables

通过环境变量的方式配置项目的运行，前面说到的`github actions`中的`secrets`其实最终也会作为环境变量注入到项目中

目前主要有以下几个环境变量可配置:

## 数字广大相关

- `GZHU_USERNAME`: 数字广大用户名
- `GZHU_PASSWORD`: 数字广大密码

## 邮箱日志服务相关

配置好后可以开启邮箱日志功能，在运行过程中遇到错误或者成功打卡后都会通知到配置的邮件中

- `EMAIL_HOST`: 邮箱服务的域名，如`qq`邮箱使用`smtp`的方式的话则配置为`smtp.qq.com`
- `EMAIL_USER`: 邮箱用户名，如`xxx@qq.com`
- `EMAIL_PASS`: 邮箱授权码，可自行登录邮箱获取
npm package: @gzhu-automation/reserve-library
Description: 广州大学图书馆预约
Author: Plasticine
Latest version: 1.0.5

# @gzhu-automation/reserve-library

可用于自动化预约广州大学图书馆一楼自习室和五楼会议室

# Usage

```shell
pnpm i @gzhu-automation/reserve-library
```

导入该包下的`run`函数，并传入配置后运行即可

```js
import { run } from '@gzhu-automation/reserve-library'

// 预约规则
const rules = (
    [
      'monday',
      'tuesday',
      'wednesday',
      'thursday',
      'friday',
      'saturday',
      'sunday',
    ] as Weekday[]
  ).map(weekday => ({
    weekday,
    area: 'firstFloor',
    roomName: '学习室E21',
    // multiRules 用于在一天内预约多个房间 每个子规则的配置会继承自外层规则对象
    // 如有配置则会覆盖外层规则对象中相应配置项
    multiRules: [
      {
        // 会覆盖外层的 roomName 配置
        roomName: '学习室E23',
        beginTime: '9:30',
        endTime: '12:00',
      },
      {
        // 这里的 roomName 会继承自外层的 roomName
        beginTime: '14:30',
        endTime: '18:30',
      }
    ],
  }))

// 常规用法
run({ gzhuUsername: '', gzhuPassword: '', rules })

// 从环境变量中读取数字广大用户名密码相关配置
run({ useEnv: true, rules })

// 等到 6:30:00 的时候才并发提交预约请求
run({ useEnv: true, rules, waitUntil: '6:30:00' })

// 加入今天是 monday，只启用 thursday 的规则 也就是总是预约未来第三天的规则
run({ useEnv: true, rules, filterWeekday: delta => delta === 3 })
```

# run 函数配置

- `useEnv`: 是否启用环境变量配置，开启后会优先使用环境变量里的配置，若没有相关环境变量则使用`run`函数的配置对象中的配置
- `gzhuUsername`: 数字广大用户名
- `gzhuPassword`: 数字广大密码
- `rules`: 预约规则，详情查看[rules 规则配置](#rules-规则配置)
- `waitUntil`: 等到特定时间才发送预约请求，这在和卷王们抢位置时十分关键，格式为`HH:mm:ss`，建议设置为`6:30:00`，这个时候是系统开放预约的时候
- `filterWeekday`: 根据规则中的`weekday`与今天之间的天数差对规则进行过滤，当配置了多个规则，而希望某个规则被过滤时可以通过该钩子进行配置

# 预约配置

配置的方式有两种:

1. 直接在`run`函数中传入`rules`数组配置
2. 通过环境变量进行配置

## rules 规则配置

也就是上面示例中的`rules`对象里的每一个规则项，类型如下:

```ts
interface ReserveRule {
  /** @description 周几预约 */
  weekday: Weekday

  /** @description 预约的区域 */
  area: ReserveArea

  /** @description 预约的房间名 */
  roomName: RoomName

  /** @description 开始时间 -- 格式: 15:20 */
  beginTime: string

  /** @description 结束时间 -- 格式: 15:20 */
  endTime: string

  /** @description 预约主题 -- 默认值为 `学习` */
  title?: string

  /** @description 除了预约发起人之外的其他预约人 */
  studentIdList?: string[]

  /** @description 一天内要预约多次时在该字段进行配置 */
  multiRules?: Partial<Omit<ReserveRule, 'weekday' | 'multiRules'>>[]
}
```

## 环境变量配置

要启用环境变量配置需要在`run`函数的第一个参数`config`对象中开启`useEnv`选项

### 登录数字广大

- `GZHU_USERNAME`: 数字广大用户名
- `GZHU_PASSWORD`: 数字广大密码

### 邮箱日志服务 -- 如果有需要可以进行配置 配置后会在成功和失败的时候通过邮件的方式通知

- `EMAIL_HOST`: 邮件服务器域名
- `EMAIL_USER`: 邮箱用户名
- `EMAIL_PASS`: 邮箱授权码

### 预约规则配置

- `RESERVE_RULES`: 预约规则 json 字符串，可先在 js 文件中编写好配置后再将`JSON.stringify()`调用后的结果作为该环境变量的值
- `RESERVE_START_TIME`: 直到指定时间才提交预约请求，将该时间设置为预约系统的最早允许预约时间`6:30`可提高预约成功率