open-index/open-npm huggingface dataset:
npm package: @snailicide/g-library
Description: Function library written in typescript
Author: Gillian Tunney
Latest version: 1.2.2

# @snailicide/g-library 🐌

[![NPM](https://img.shields.io/npm/v/@snailicide/g-library)](http://www.npmjs.com/package/@snailicide/g-library)
![License: MIT](https://img.shields.io/npm/l/@snailicide/g-library)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Utility function library written in typescript

---

![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![Ramda](https://img.shields.io/badge/ramda-purple?style=for-the-badge&logo=javascript)
![Zod](https://img.shields.io/badge/zod-%233068b7.svg?style=for-the-badge&logo=zod&logoColor=white)
![MomentJS](https://img.shields.io/badge/moment_JS-darkgreen?style=for-the-badge&logo=javascript)
![Typefest](https://img.shields.io/badge/Type_Fest-grey?style=for-the-badge&logo=typescript)

### Repository

- **Github:**
  [`@snailicide/g-library`](https://github.com/gbtunney/snailicide-monorepo/tree/main/packages/g-library)
  • [`snailicide-monorepo`](https://github.com/gbtunney/snailicide-monorepo.git)
- **CDN**:
  [jsdeliver](https://cdn.jsdelivr.net/npm/@snailicide/g-library/dist/cdn-index-iife.min.js)
- **Documentation**:
  [@snailicide/g-library docs](https://g-library.snailicide.com)

### Author

👤 **Gillian Tunney**

- [github](https://github.com/gbtunney)
- [email](mailto:gbtunney@mac.com)

> Recommended package manager is [pnpm](http://pnpm.io)
>
> [![PNPM](https://img.shields.io/badge/pnpm-%234a4a4a.svg?style=for-the-badge&logo=pnpm&logoColor=f69220)](http://pnpm.io)

## @snailicide/g-library 🐌

---

The `@snailicide/g-library` package is a function library designed to provide a
collection of reusable functions that can be utilized across any project. It
aims to encapsulate common logic and utilities to promote code reuse and
maintainability.

#### Key Features

- **Reusable Functions**: Offers a wide range of utility functions that can be
  used across different modules and components within the project.
- **Common Utilities**: Includes functions for common tasks such as data
  manipulation, formatting, validation, and more.

---

### Installation

This library is published in the NPM registry and can be installed using any
compatible package manager.

```sh
#pnpm
pnpm add @snailicide/g-library

#yarn
yarn add @snailicide/g-library

#npm
npm install @snailicide/g-library
```

### Helpful Links

- [Ramda](https://ramdajs.com/docs/)
- [Ramda Adjunct](https://char0n.github.io/ramda-adjunct/5.0.1/)
- [Zod](https://zod.dev/)
- [Moment.js](https://momentjs.com/docs/)
- [type-fest](https://github.com/sindresorhus/type-fest)
npm package: @snailicide/g-shopify-library
Description: Collections of types and utilities for working with Shopify
Author: Gillian Tunney
Latest version: 0.3.7

# @snailicide/g-shopify-library 🐌

[![NPM](https://img.shields.io/npm/v/@snailicide/g-shopify-library)](http://www.npmjs.com/package/@snailicide/g-shopify-library)
![License: MIT](https://img.shields.io/npm/l/@snailicide/g-shopify-library)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

_This plugin enables Shopify theme developers to structure their code into
"module" folders which keep Liquid template files (snippets and sections)
organized together with their corresponding JS or CSS, while retaining the
standard file structure of Shopify themes._

### Repository

[snailicide-monorepo](https://github.com/gbtunney/snailicide-monorepo.git)

### Author

👤 **Gillian Tunney**

- [github](https://github.com/gbtunney)
- [email](mailto:gbtunney@mac.com)

## 🐌

> Collections of types and utilities for working with Shopify

- 🐌Welcome to @snailicide/g-shopify-library🐌
  - [Features](#features)
  - [Installation](#installation)
  - [Helpful Links](#helpful-links)
  - [To-Do](#to-do)
  - [Bugs](#bugs)

[Table of contents generated with markdown-toc](http://ecotrust-canada.github.io/markdown-toc)

## Features

- Generic functions for Storefront API, Shopify MediaURLs, etc
- Section Schema types and validators (using zod)

## Usage

### Installation

This library is published in the NPM registry and can be installed using any
compatible package manager.

```bash
#npm
npm i @snailicide/g-shopify-library -D

# yarn
yarn add @snailicide/g-shopify-library -D

# pnp
pnpm add @snailicide/g-shopify-library -D
```

## Helpful Links

- [Shopify Section schema reference](https://shopify.dev/themes/architecture/sections/section-schema)
- [@shopify/admin-graphql-api-utilities](https://www.npmjs.com/package/@shopify/admin-graphql-api-utilities)
- [Zod](https://zod.dev/)
- [TypeScript](https://www.typescriptlang.org)
- [Ramda](https://ramdajs.com/docs)

## To-Do

- [ ] Presets (in new version)
- [ ] Documentation

## Bugs

Please create an issue if you found any bugs, to help us improve this project!
npm package: @snailicide/g-windi
Description: Function library for Windicss/UnoCSS and Vue 3
Author: Gillian Tunney
Latest version: 0.0.12

# @snailicide/g-windi 🐌

[![NPM](https://img.shields.io/npm/v/@snailicide/g-windi)](http://www.npmjs.com/package/@snailicide/g-windi)
![License: MIT](https://img.shields.io/npm/l/@snailicide/g-windi)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

_Provides repository with base configurations that can be extended in new
packages._

---

![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)
![TypeScript](https://img.shields.io/badge/vuejs-%2335495e.svg?style=for-the-badge&logo=vuedotjs&logoColor=%234FC08D)
![UnoCSS](https://img.shields.io/badge/unocss-333333.svg?style=for-the-badge&logo=unocss&logoColor=white)
![Windicss](https://img.shields.io/badge/windicss-48B0F1.svg?style=for-the-badge&logo=windi-css&logoColor=white)

### Repository

- **Github:**
  [snailicide-monorepo](https://github.com/gbtunney/snailicide-monorepo.git)

- **NPM Homepage**:
  [@snailicide/g-windi](http://www.npmjs.com/package/@snailicide/g-windi)

### Author

👤 **Gillian Tunney**

- [github](https://github.com/gbtunney)
- [email](mailto:gbtunney@mac.com)

> Recommended package manager is [pnpm](http://pnpm.io)
>
> [![PNPM](https://img.shields.io/badge/pnpm-%234a4a4a.svg?style=for-the-badge&logo=pnpm&logoColor=f69220)](http://pnpm.io)

### Repository

[snailicide-monorepo](https://github.com/gbtunney/snailicide-monorepo.git)

### Author

👤 **Gillian Tunney**

- [github](https://github.com/gbtunney)
- [email](mailto:gbtunney@mac.com)

## 🐌

[g-windi](https://www.npmjs.com/package/@snailicide/g-windi): A collection of
utility functions for building configurations and themes for WindiCSS. These can
also be used for similar frameworks like TailwindCSS and Unocss.

- Includes functions that utilize Windi CSS's engine at runtime to debug full
  configurations, including plugins.full configuration is resolved by the build
  tools. This is similar to
  [antfu/windicss-runtime-dom: 🪄](https://github.com/antfu/windicss-runtime-dom),
  except does not use mutation observer.
- This is useful for a wide range of purposes, including debugging specific
  configurations, as well as compiling classes added via form, like Shopify's
  Customizer or Elementor.

## Installation

This library is published in the NPM registry and can be installed using any
compatible package manager.

```sh
#pnpm
pnpm add @snailicide/g-windi

#yarn
yarn add @snailicide/g-windi

#npm
npm install @snailicide/g-windi
```

**TODO**: figure out how to change the filenames-simple/naming-convention for
composables
npm package: @snailuu/base
Description: 基础工具库
Author: snailuu
Latest version: 0.1.1

- @snailuu/base

  > README 每次发包才会更新，如果需要看最新的更新日志或文档，请前往 homepage 查看

  ## 更新日志

  ### 日志标识总览

  - (O) 对象
  - (D) 目录
  - (F) 函数
  - (I) 接口
  - (CV) 常量
  - (T) 类型
  - -> 别名

  

  ## v0.1.0

  新增

  -   (D)data-handler

  

  ## v0.0.9

  修改

  重新修改导出类型声明

  ## v0.0.8
  
  新增
  
  - (F) toSyncFunc
  
  ### v0.0.7
  
  新增
  
  - (D) verify
    - (D) base
      - (F) isUrl
    - (D) array
      - (F) isArrayLike
      - (F) isArray
    - (D) caniuse
      - (F) caniuseCSSFeature
      - (F) caniuse
    - (D) function
      - (F) isAsyncFunc
      - (F) isConstructor
  
  更新 `verify` 分类下的函数， `isXXX` 等函数能直接断言其数据类型
  
  ### v0.0.6
  
  新增
  
  - (D) func-handle
    - (F) onceFunc
    - (F) memoize
    - (F) cacheByReturn
    - (F) tryCall
    - (F) tryCallFunc
    - (F) completion
    - (F) chunkTask
  
  修改
  
  - 修改 `getRandomString` 逻辑
  
  ### v0.0.5
  
  新增
  
  - （D) types
    - (T) THeadType
    - (T) TLastType
  - (D) utils
    - (T) GCArgs
    - (T) CookieOptions
    - (F) generateClassname
    - (F) generateCokkieInfo
  
  修改
  
  - 将 `any` 类型修改为 `unknown` 类型
  
  ### v0.0.4
  
  新增
  
  - (D) cirDep
    - (F) getType
  - (D) types
    - (T) TFunc
    - (T) TAnyFunc
    - (T) TArgsType
    - (T) GetArgs
    - (T) GetReturnType
  - (D) utils
    - (F) debounce
    - (F) throttle
    - (F) isTrue
    - (F) isFalse
    - (F) isArray
    - (F) isEmpty
    - (F) isFile
    - (F) isBlob
  
  ### v0.0.3
  
  新增
  
  - (D) utils
    - (F) isNull
    - (F) isNaN
    - (F) isNumber
    - (F) isPromise
  - (D) commom
    - (F) waring
    - (D) constant
      - (CV) EMPTY
      - (CV) STATIC_TYPE
  - (D) types
    - (T) TAllType
  
  ### v0.0.2
  
  新增
  
  - (D) utils
    - (F) getNow
    - (F) getRandomString
    - (F) sleepAsync
  
  ### v0.0.1
  
  新增
  
  - (F) sleep
npm package: @snailuu/git-down
Description: 下载 git 仓库或文件
Author: snailuu
Latest version: 0.2.1

# @snailuu/git-down

下载 GitHub 仓库或单文件的工具包

## 功能

- 支持下载整个 GitHub 仓库
- 支持下载仓库中的单个文件或目录
- 使用 Git 的 sparse checkout 功能高效下载部分仓库内容
- 提供 Promise 和 callback 两种调用方式
- 自动清理临时文件

## 安装

```bash
npm install @snailuu/git-down
# 或
yarn add @snailuu/git-down
# 或
pnpm add @snailuu/git-down
```

## 使用方法

### 下载整个仓库

```js
import gitDown from '@snailuu/git-down';

// Promise 方式
await gitDown('https://github.com/snailuu/toolbox', {
  output: './output-dir',
  branch: 'main'
});
```

```js
// 回调方式
import { gitDownWithCallback } from '@snailuu/git-down';

gitDownWithCallback('https://github.com/snailuu/toolbox', { output: './output-dir' }, (error) => {
  if (error)
    console.error('下载失败:', error);
  else console.log('下载成功');
});
```

### 下载特定文件或目录

```js
// 下载特定目录
await gitDown('https://github.com/snailuu/toolbox/tree/main/packages/git-down', {
  output: './output-dir'
});

// 下载特定文件
await gitDown('https://github.com/snailuu/toolbox/blob/main/README.md', {
  output: './output-dir'
});
```

### 解析 GitHub URL

```js
import { parseGitUrl } from '@snailuu/git-down';

const urlInfo = parseGitUrl('https://github.com/snailuu/toolbox/tree/main/packages/git-down');
console.log(urlInfo);
// {
//   href: 'https://github.com/snailuu/toolbox/tree/main/packages/git-down',
//   owner: 'snailuu',
//   project: 'toolbox',
//   isRepo: false,
//   sourceType: 'dir',
//   branch: 'main',
//   pathname: 'packages/git-down'
// }
```

### 使用 CLI 命令

查看使用命令

```shell
gdd --help
```

开始使用

```shell
gdd https://github.com/snailuu/toolbox/tree/main/document
```

## 选项

| 选项   | 类型   | 默认值       | 描述               |
| ------ | ------ | ------------ | ------------------ |
| output | string | './git-down' | 下载内容的输出路径 |
| branch | string | 'main'       | 下载的分支名称     |

## 注意事项

下载过程中会频繁修改执行目录，请勿在运行期间执行文件相关操作，除非你清楚执行目录的修改行为。

## 更新

### v0.2.0

增加 `gd` 命令行工具提供下载能力

### v0.1.0

实现基本的文件下载功能
npm package: @snaily-cad/image-data-uri
Description: Library to easily decode/encode Data URI images
Author: Diego ZoracKy
Latest version: 3.1.1

# Image Data URI

Library to easily decode/encode Data URI images

## Installation

```bash
npm install image-data-uri
```

## Methods

- **decode(dataURI)**

```javascript
imageDataURI.decode('data:image/png;base64,SOMEPNGDATAURI/wD/')

// RETURNS
{
    imageType: 'image/png',
    dataBase64: 'SOMEPNGDATAURI/wD/',
    dataBuffer: <Buffer 89 50 4e 47 0d 0a ...>
}
```

- **encode(data, mediaType)**

```javascript
// Expects a Buffer of a image file
let dataBuffer = new Buffer(imageData);

// PNG | GIF | etc.
let mediaType = "PNG";

// RETURNS :: image data URI :: 'data:image/png;base64,PNGDATAURI/wD/'
imageDataURI.encode(dataBuffer, mediaType);
```

- **encodeFromURL(imageURL)**

```javascript
// Returns a Promise
imageDataURI
  .encodeFromURL("http://www.some-site.com/some-image.png")

  // RETURNS image data URI :: 'data:image/png;base64,PNGDATAURI/'
  .then((res) => console.log(res));
```

- **encodeFromFile(filePath)**

```javascript
// Returns a Promise
imageDataURI
  .encodeFromFile("./some-file.png")

  // RETURNS image data URI :: 'data:image/png;base64,PNGDATAURI/'
  .then((res) => console.log(res));
```

- **outputFile(dataURI, filePath)**

```javascript
// Some image data uri
let dataURI = "data:image/png;base64,PNGDATAURI/";

// It will create the full path in case it doesn't exist
// If the extension is defined (e.g. fileName.png), it will be preserved, otherwise the lib will try to guess from the Data URI
let filePath = "./out/path/fileName";

// Returns a Promise
imageDataURI
  .outputFile(dataURI, filePath)

  // RETURNS image path of the created file 'out/path/fileName.png'
  .then((res) => console.log(res));
```
npm package: @snailycad/image-data-uri
Description: Library to easily decode/encode Data URI images
Author: Diego ZoracKy
Latest version: 3.2.0

# Image Data URI

Library to easily decode/encode Data URI images

## Installation

```bash
npm install image-data-uri
```

## Methods

- **decode(dataURI)**

```javascript
imageDataURI.decode('data:image/png;base64,SOMEPNGDATAURI/wD/')

// RETURNS
{
    imageType: 'image/png',
    dataBase64: 'SOMEPNGDATAURI/wD/',
    dataBuffer: <Buffer 89 50 4e 47 0d 0a ...>
}
```

- **encode(data, mediaType)**

```javascript
// Expects a Buffer of a image file
let dataBuffer = new Buffer(imageData);

// PNG | GIF | etc.
let mediaType = "PNG";

// RETURNS :: image data URI :: 'data:image/png;base64,PNGDATAURI/wD/'
imageDataURI.encode(dataBuffer, mediaType);
```

- **encodeFromURL(imageURL)**

```javascript
// Returns a Promise
imageDataURI
  .encodeFromURL("http://www.some-site.com/some-image.png")

  // RETURNS image data URI :: 'data:image/png;base64,PNGDATAURI/'
  .then((res) => console.log(res));
```

- **encodeFromFile(filePath)**

```javascript
// Returns a Promise
imageDataURI
  .encodeFromFile("./some-file.png")

  // RETURNS image data URI :: 'data:image/png;base64,PNGDATAURI/'
  .then((res) => console.log(res));
```

- **outputFile(dataURI, filePath)**

```javascript
// Some image data uri
let dataURI = "data:image/png;base64,PNGDATAURI/";

// It will create the full path in case it doesn't exist
// If the extension is defined (e.g. fileName.png), it will be preserved, otherwise the lib will try to guess from the Data URI
let filePath = "./out/path/fileName";

// Returns a Promise
imageDataURI
  .outputFile(dataURI, filePath)

  // RETURNS image path of the created file 'out/path/fileName.png'
  .then((res) => console.log(res));
```
npm package: @snailycfx/nexus
Description: Bukkit-inspired framework for roblox-ts
Author: Snaily
Latest version: 1.0.13

# @snailycfx/nexus

A Bukkit-inspired game framework for roblox-ts. Build your Roblox games the Java way — classes, listeners, lifecycle hooks, and a clean event system.

## Installation
```bash
pnpm add @snailycfx/nexus
pnpm add @snailycfx/nexus-transformer --save-dev
```

Add the transformer to your `tsconfig.json`:
```json
{
    "compilerOptions": {
        "plugins": [
            { "transform": "@snailycfx/nexus-transformer" }
        ]
    }
}
```

## Quick Start
```typescript
import { Nexus, IListener, EventHandler, PlayerJoinEvent } from "@snailycfx/nexus"

class PlayerListener implements IListener {

    @EventHandler()
    public onPlayerJoin(event: PlayerJoinEvent): void {
        print(`${event.getPlayer().Name} joined!`)
    }
}

class MyGame extends Nexus {

    public getName(): string { return "MyGame" }

    public override onEnable(): void {
        Nexus.getServer().getEventManager().register(new PlayerListener())
        this.getLogger().success("MyGame is running!")
    }

    public override onDisable(): void {
        this.getLogger().info("MyGame is stopping...")
    }
}

new MyGame()
```

## Features

- **Lifecycle hooks** — `onEnable` and `onDisable` called automatically
- **Event system** — Bukkit-style listeners with `@EventHandler`
- **Priority support** — `EventPriority.Lowest` through `EventPriority.Monitor`
- **Async handlers** — `@EventHandler({ async: true })`
- **Custom events** — extend `NexusEvent` to create your own
- **Built-in events** — `PlayerJoinEvent`, `PlayerLeaveEvent`

## Events

### Built-in
```typescript
@EventHandler()
public onPlayerJoin(event: PlayerJoinEvent): void { }

@EventHandler()
public onPlayerLeave(event: PlayerLeaveEvent): void { }
```

### Custom
```typescript
export class WaveStartedEvent extends NexusEvent {
    public constructor(private readonly wave: number) { super() }
    public getWave(): number { return this.wave }
}

// Dispatch
Nexus.getServer().getEventManager().dispatch(new WaveStartedEvent(1))

// Listen
@EventHandler({ priority: EventPriority.High })
public onWaveStarted(event: WaveStartedEvent): void {
    print(`Wave ${event.getWave()} started!`)
}
```

## Requirements

- `roblox-ts` >= 3.0.0
- `@snailycfx/nexus-transformer`

## License

MIT
npm package: @snailycfx/nexus-transformer
Description: TypeScript transformer for @snailycfx/nexus — injects event parameter metadata
Author: Snaily
Latest version: 1.0.7

# @snailycfx/nexus-transformer

TypeScript compiler transformer for [@snailycfx/nexus](https://github.com/imsnaily/nexus-framework).

Automatically injects event parameter metadata at compile time, enabling
`@EventHandler()` to resolve event types without manual configuration.

## Installation
```bash
npm install @snailycfx/nexus-transformer
npx ts-patch install
```

## Setup

Add the transformer to your `tsconfig.json`:
```json
{
    "compilerOptions": {
        "plugins": [
            { "transform": "@snailycfx/nexus-transformer" }
        ]
    }
}
```

## How it works

The transformer scans your code at compile time for methods decorated
with `@EventHandler()` and injects a `NexusMetadata.define()` call
with the event class type automatically.

**Before:**
```typescript
@EventHandler()
public onWaveStarted(event: WaveStartedEvent): void {
    print(event.getWave())
}
```

**After (generated):**
```typescript
NexusMetadata.define("paramtypes", [WaveStartedEvent], target, "onWaveStarted")
@EventHandler()
public onWaveStarted(event: WaveStartedEvent): void {
    print(event.getWave())
}
```

## Requirements

- `typescript` >= 5.0.0
- `ts-patch` >= 3.0.0
- `@snailycfx/nexus`

## License

MIT
npm package: @snailyuan/tools
Description: 工具库
Author: mark.yuan
Latest version: 1.0.2

## @snailyuan/tools

一款实用的工具类

### random 随机数

#### random()

> web 端生成 0 ～ 1 随机数之间随机数

使用方法：

```js
import tools from '@snailyuan/tools'
tools.random.random() // 0.12345678901234567
```

#### randomValue(min, max)

> web 端生成指定范围内的随机整数

使用方法：

```js
import tools from '@snailyuan/tools'
tools.random.randomValue(0, 61) // 5
```

#### randomStr(size = 6)

> web 端生成指定长度的随机字符串, 默认为 6 位

```js
import tools from '@snailyuan/tools'
tools.random.randomStr() // FPUSQ6
```

#### getRandomInt(max)

> 获取指定范围内的随机整数

```js
import tools from '@snailyuan/tools'
tools.random.getRandomInt(1) // 1
```

#### generateRandom(num)

> 生成一个指定长度的随机数

```js
import tools from '@snailyuan/tools'
tools.random.generateRandom(6) // 919184
```

#### mathRandomStr(size = 6)

> 生成指定长度的随机字符串 (主要用于小程序未提供生产随机数方法的场景)

```js
import tools from '@snailyuan/tools'
tools.random.mathRandomStr() // FPUSQ6
```

#### wxRandom()

> 微信端生成 0 ～ 1 随机数之间随机数，返回的为 promise

使用方法：

```js
import tools from '@snailyuan/tools'
const random = await tools.random.wxRandom() // 0.12345678901234567
```

#### wxRandomValue(min, max)

> 微信端生成指定范围内的随机整数，返回的为 promise

使用方法：

```js
import tools from '@snailyuan/tools'
const randomValue = await tools.random.wxRandomValue(0, 61) // 5
```

#### wxRandomStr(size = 6)

> 微信端生成指定长度的随机字符串, 默认为 6 位

```js
import tools from '@snailyuan/tools'
tools.random.wxRandomStr() // FPUSQ6
```