open-index/open-npm huggingface dataset:
npm package: @linronglang/js-code
Description: 常用的js代码片段
Author: 272805749@qq.com
Latest version: 0.2.0

# 封装常用的 js 方法

- install

`npm install @linronglang/js-code -S`

- datejs

```js
const { datejs } = require("@linronglang/js-code");
// 几个常用的时间转换
console.log(datejs.format("YYYY-MM-DD HH:mm:ss"));
console.log(datejs.format("YYYY-MM-DD"));
console.log(datejs.format("HH:mm:ss"));
```

- url

```js
const { url } = require("@linronglang/js-code");
// url参数的解析
console.log(url.parse("http://baidu.com?a=1&b=2&xxx=xxxx"));
console.log(url.params({ a: 1, b: 2, c: 3 }));
```

- uuid

```js
const { uuid } = require("@linronglang/js-code");
// 生成不重复的id
console.log(uuid());
```

- downLoad

```js
const { downLoad } = require("@linronglang/js-code");
// 下载
downLoad("地址", "文件的名字.xxx");
```

- debounce, throttle

```js
const { debounce, throttle } = require("@linronglang/js-code");
// 防抖
document.addEventListener("input", e =>
  debounce(fun, 1000, this, [e, a, b, c])
);
// 节流
document.addEventListener("input", e =>
  throttle(fun, 1000, this, [e, a, b, c])
);
```

- deepCopy

```js
const { deepCopy } = require("@linronglang/js-code");
// 深拷贝
let a = { a: 1 };
console.log(deepCopy(a));
```

- isOs

```js
const { isOs } = require("@linronglang/js-code");
// 判断操作系统
console.log(isOs()); // Mac
```

- loadScript

```js
const { loadScript } = require("@linronglang/js-code");
// 加载js文件
loadScript("http://cdn.staticfile.org/jquery/1.6.2/jquery.min.js").then(() => {
  console.log("load", $("body"));
});
```

- randomRGB

```js
// 随机生成rgb
const { randomRGB } = require("@linronglang/js-code");
console.log(randomRGB());
// { r: 235, g: 181, b: 60 }
```
npm package: @linsforever/poet
Description: A machine poet for Avril Li
Author: AvrilLi
Latest version: 0.1.9

# Machine Poet

A machine poet for Avril Li.

## Installation

```bash
$ npm i @linsforever/poet -g
```

## Usage

```bash
Usage: poet [options]

Generate poem with customize variables

Options:
  -v, --version                       output the current version
  -t, --type [type]                   poem type: 5/7/0
  -b, --birthday [birthday]           generate by birthday, e.g: 20210101
  -h, --help                          display help for command

Example call:
  $ poet --help
```

### Random poem

```bash
$ poet 
```

### Generate poem by type

```bash
$ poet -t 7
```

### Generate poem by birthday

```bash
$ poet -b 20210101
```

## License

MIT License

Copyright (c) 2021 Avril Li.
npm package: @linsforever/warmer
Description: Avril's Serverless application warmer
Author: avrilli
Latest version: 1.0.1

# Serverless Warmer

Application Warmer for Serverless Framework.

- [@slsplus/warmer](#Serverless-Warmer)
  - [Installation](#installation)
  - [Usage](#usage)
    - [Warm up serverless application](#Warm-up-serverless-application)
    - [Warm up serverless cloud function](#Warm-up-serverless-cloud-function)

## Installation

```bash
$ npm i @linsforever/warmer -g
```

## Usage

```bash
Usage: ywarm [options]

Warm up serverless application with customize variables

Options:
  -v, --version                       output the current version
  -n, --name [name]                   instance name, name config in serverless.yml
  -a, --app [app]                     app name, app config in serverless.yml
  -r, --region [region]               region of function (default: 'ap-guangzhou')
  -s, --stage [stage]                 app stage, stage config in serverless.yml (default: 'dev')
  -o, --org [org]                     app org name, org config in serverless.yml
  -f, --function-name [functionName]  cloud function name
  -h, --help                          display help for command

Example call:
  $ ywarm --help
```

### Warm up serverless application

```bash
$ ywarm --name=expressdemo --app=appname --stage=dev --org=myorg
```

### Warm up serverless cloud function

```bash
$ ywarm -f 'express_jyovx1a'
```

## License

MIT License

Copyright (c) 2021 Tencent Cloud, Inc.
npm package: @linshisancc/babylon-ts-helper
Description: 简单的Babylon.js工具函数库
Author: wenjie
Latest version: 1.0.0

# @wenjie/babylon-ts-helper

一个简单的Babylon.js工具函数库，使用TypeScript编写。提供了基本场景创建和模型加载功能。

## 安装

```bash
npm install @wenjie/babylon-ts-helper
# 或
yarn add @wenjie/babylon-ts-helper
# 或
pnpm add @wenjie/babylon-ts-helper
```

## 功能

该库提供两个主要功能：

1. `createScene`: 创建一个包含简单立方体的Babylon.js场景
2. `loadModel`: 加载3D模型到指定场景中

## 使用示例

```typescript
import { createScene, loadModel } from '@wenjie/babylon-ts-helper';

// 获取canvas元素
const canvas = document.getElementById('renderCanvas') as HTMLCanvasElement;

// 创建场景
const scene = createScene(canvas);

// 加载模型
loadModel(scene, 'https://example.com/models/', 'model.glb')
  .then(() => {
    console.log('模型加载成功');
  })
  .catch((error) => {
    console.error('模型加载失败:', error);
  });
```

## 开发

```bash
# 安装依赖
pnpm install

# 开发模式（监视文件变化）
pnpm dev

# 构建项目
pnpm build

# 运行类型检查
pnpm lint
```

## 发布

```bash
# 发布补丁版本(0.0.x)
pnpm release:patch

# 发布次要版本(0.x.0)
pnpm release:minor

# 发布主要版本(x.0.0)
pnpm release:major
```

## 许可证

MIT