open-index/open-npm huggingface dataset:
npm package: @iyowei/callsite-home
Description: 异步获取指定 Git 项目远程仓库地址。
Latest version: 1.0.1

# @iyowei/callsite-home

> 获取引用当前模块的脚本被调用时所在应用的根目录。

命令行应用会有诸如读取 "默认模板"、“默认配置” 一类需要，如果这些默认文件被设计放在应用安装目录下，就需要先获取该应用被安装的绝对路径，这与 `process.cwd()` 得到的当前工作目录是不同的，当前工作目录是执行命令行应用所在的位置。

## 使用

```js
import { log } from 'console';
import { callsiteHome, callsiteHomeSync } from '@iyowei/callsite-home';

log(callsiteHomeSync('create-esm'));
// /Users/iyowei/Development/iyowei/create-esm

(async () => {
  const tmpPath = await callsiteHome();
  log(tmpPath);
  // /Users/iyowei/Development/iyowei/create-esm
})();
```

## API

### callsiteHome([pathSegment])

- pathSegment {String} 路径片段，一般是应用的名称，不提供的情况下会自动识别，但推荐手动提供，**选填**；
- 返回 {`Promise<String>`} 引用当前模块的脚本被调用时所在应用的根目录。

### callsiteHomeSync([pathSegment])

- pathSegment {String} 路径片段，一般是应用的名称，不提供的情况下会自动识别，但推荐手动提供，**选填**；
- 返回 {String} 引用当前模块的脚本被调用时所在应用的根目录。

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/callsite-home

# yarn
yarn add @iyowei/callsite-home

# npm
npm add @iyowei/callsite-home
```

## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
npm package: @iyowei/cli-cancel-or-continue
Description: 拦停命令行会话，以选择中断或继续当前会话。
Latest version: 1.0.1

[Node Version Badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[Download Node.js]: https://nodejs.org/en/download/
[PRs Welcome Badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

# cancelOrContinue()

> 拦停命令行会话，以选择中断或继续当前会话。

## 使用

- 返回 {Promise} 在命令行接收到输入信号时释放，或当用户输入的是 `ctrl + c` 快捷键时，终止命令行会话。

```js
import { log } from "console";
import cancelOrContinue from "@iyowei/cli-cancel-or-continue";

(async () => {
  log("按 [ctrl + c] 终止，或按其它 [任意] 键继续...");
  await cancelOrPressAnyKeyToContinue();

  log("结束");
})();
```

## 安装

[![Node Version Badge][Node Version Badge]][Download Node.js]

```shell
# Pnpm
pnpm add @iyowei/cli-cancel-or-continue

# yarn
yarn add @iyowei/cli-cancel-or-continue

# npm
npm add @iyowei/cli-cancel-or-continue
```

## 参与贡献

![PRs Welcome][PRs Welcome Badge]
npm package: @iyowei/get-git-repo-url
Description: 异步获取指定 Git 项目远程仓库地址。
Latest version: 1.0.1

[@iyowei/get-git-repo-url-sync]: #
[@iyowei/p-get-git-repo-url]: #



# getGitRepoUrl(path, callback)

> **异步** 获取指定 Git 项目远程仓库地址。

## 使用

- path {String} 工作路径，**默认：** `""`；
- callback {Function}，
  - err {Error} 错误信息，没发生错误，则返回 `false`；
  - url {String | Null} 远程 Git 仓库地址。

```javascript
import getGitRepoUrl from '@iyowei/get-git-repo-url';

getGitRepoUrl(process.cwd(), (err, url) => {
  if (!err) {
    console.log(url);
    return;
  }

  throw err;
});
```

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/get-git-repo-url

# yarn
yarn add @iyowei/get-git-repo-url

# npm
npm add @iyowei/get-git-repo-url
```

## 相关

- [@iyowei/get-git-repo-url-sync][@iyowei/get-git-repo-url-sync], 串行实现；
- [@iyowei/p-get-git-repo-url][@iyowei/p-get-git-repo-url]，并行接口，Promise 版。

## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
npm package: @iyowei/is-esm
Description: 通过 AST 检测 JS 文件是不是 ESM，并非读取 'package.json' 文件中 'type' 设置。
Latest version: 1.0.1

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

# isESM(path)

> 通过 AST 检测 JS 文件是不是 ESM，并非读取 "package.json " 文件中 "type" 设置。

## 使用

- `path`，{ String }，路径

```js
import { log } from "console";
import { isESM, isESMSync } from "@iyowei/is-esm";

(async () => {
  log(await isESM("/Users/iyowei/Development/iyowei/create-esm/src/print.js")); // 异步
  // true

  log(isESMSync("/Users/iyowei/Development/iyowei/create-esm/src/print.js")); // 串行
  // true
})();
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/is-esm

# yarn
yarn add @iyowei/is-esm

# npm
npm add @iyowei/is-esm
```

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/is-readme-path
Description: 异步获取指定 Git 项目远程仓库地址。
Latest version: 1.0.1

# isReadmePath(path)

> 判定给定路径是否指向一个 README.md。

## 使用

- path {String} 路径，**默认：** `""`；
- 返回 {Boolean} 指向 README.md 为 `true`，否则 `false`。

```js
import {log} from 'console';
import isReadmePath from '@iyowei/is-readme-path';

log(isReadmePath('isReadmePath("~/README.md"))')); // true

```

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/is-readme-path

# yarn
yarn add @iyowei/is-readme-path

# npm
npm add @iyowei/is-readme-path
```

## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
npm package: @iyowei/is-tilde-path
Description: 识别路径是否类似 '~/Development/OpenSource'。
Latest version: 1.0.0

# isTildePath(path)

> 识别路径是否类似 `~/Development/OpenSource`。

## 使用

- `path`，{ String }，路径

```js
import { log } from 'console';
import isTildePath from '@iyowei/is-tilde-path';

log(isTildePath('~/Development/OpenSource`')); // true
log(isTildePath('/Users/iyowei/Development/OpenSource`')); // false
```

## 安装

[![Node Version Badge][node version badge]][download node.js] ![esm][esm]

```shell
# Pnpm
pnpm add @iyowei/is-tilde-path

# yarn
yarn add @iyowei/is-tilde-path

# npm
npm add @iyowei/is-tilde-path
```

## 参与贡献

![PRs Welcome][prs welcome badge]



[esm]: https://img.shields.io/badge/ESM-brightgreen?style=flat
[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
npm package: @iyowei/is-true
Description: 检查传入参数是不是布尔值且为 true。
Latest version: 1.0.0

# isTrue(bool)

> 检查传入参数是不是布尔值且为 `true`。

## 使用

```js
import { log } from "console";
import isTrue from "@iyowei/is-true";

log(isTrue(true)); // true
log(isTrue(false)); // false
log(isTrue('')); // false
log(isTrue({})); // false
log(isTrue(123)); // false
```

## 安装

![esm][esm] [![Node Version Badge][node version badge]][download node.js] ![browser][browser]

```shell
# Pnpm
pnpm add @iyowei/is-true

# yarn
yarn add @iyowei/is-true

# npm
npm add @iyowei/is-true
```

## 参与贡献

![PRs Welcome][prs welcome badge]

## 其它

"@iyowei/is-true" 使用 [@iyowei/create-esm][create-esm] 脚手架生成。

[browser]: https://img.shields.io/badge/Browser-orange?style=flat
[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[esm]: https://img.shields.io/badge/ESM-brightgreen?style=flat
[create-esm]: https://github.com/iyowei/create-esm
npm package: @iyowei/is-virtual-root
Description: 识别路径是否类似 '~/Development/OpenSource'。
Latest version: 1.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

# isVirtualRoot(path)

> 识别路径是否类似 `~/Development/OpenSource`。

## 使用

- `path`，{ String }，路径

```js
import { log } from 'console';
import isVirtualRoot from '@iyowei/is-virtual-root';

log(isVirtualRoot('~/Development/OpenSource`')); // true
log(isVirtualRoot('/Users/iyowei/Development/OpenSource`')); // false
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/is-virtual-root

# yarn
yarn add @iyowei/is-virtual-root

# npm
npm add @iyowei/is-virtual-root
```

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/js-module-dependencies-to-be-installed
Description: JavaScript 模块（esm, cjs, amd, ts, tsx, jsx）说明符过滤器：需要额外安装的的模块。
Latest version: 1.0.1

[precinct]: https://github.com/dependents/node-precinct

# jsModuleDependenciesToBeInstalled(specifiers)

> JavaScript 模块（esm, cjs, amd, ts, tsx, jsx）说明符过滤器：需要额外安装的的模块。

依赖（说明符）收集器，见 [Precinct][precinct]。

## 使用

- specifiers {Array} [Precinct][precinct] 收集器收集到的模块说明符集合，默认 **`[]`**；
- 返回 {Array} 需要额外安装的的模块名称。

```js
import { readFileSync } from "fs";
import { log } from "console";

import precinct from "detective-es6";
import jsModuleDependenciesToBeInstalled from "@iyowei/js-module-dependencies-to-be-installed";

/**
 * "/Users/iyowei/Development/iyowei/create-esm/cli.js" 片段，
 *
 * import { existsSync } from "fs";
 * import { Listr } from "listr2";
 * import shell from "shelljs";
 * import meow from "meow";
 * import chalk from "chalk";
 * import { banner, mainHelp, setupHelp, COMMAND_SET, COMMAND_DEFAULTS, getReport } from "./src/messages.js";
 * import pressAnyKeyToContinue from "./src/pressAnyKeyToContinue.js";
 * import { updateGlobalConfigurations, getGlobalConfigurations } from "./src/options/global.js";
 * import makeOptions from "./src/options/make.js";
 * import prerequisites from "./src/prerequisites.js";
 */
const specifiers = precinct(
  readFileSync("/Users/iyowei/Development/iyowei/create-esm/cli.js", "utf-8")
);

const read = jsModuleDependenciesToBeInstalled(specifiers);
console.log("read", read);
// read: [ 'listr2', 'shelljs', 'meow', 'chalk' ]

const given = jsModuleDependenciesToBeInstalled([
  "./startup.js",
  "../config.mjs",

  "file:///opt/nodejs/config.js",

  "/opt/nodejs/config.mjs",

  "fs",
  "node:fs",
  "node:fs/promise",

  "some-package",

  "@others/test",
  "@npmcli/package-json",

  "@npmcli/package-json/promise",
  "some-package/lib/shuffle.mjs",
]);
console.log("given", given);
// given: given [ 'some-package', '@others/test', '@npmcli/package-json' ]
```

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/js-module-dependencies-to-be-installed

# yarn
yarn add @iyowei/js-module-dependencies-to-be-installed

# npm
npm add @iyowei/js-module-dependencies-to-be-installed
```

## 设计

ESM, CJS, AMD, TS, TSX, JSX，等等，模块定义很多，对应了不同依赖（说明符）收集器，但说明符规范是一致的，所以将过滤器部分提取出来，方便复用。

## 参与贡献

![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
npm package: @iyowei/latest-gitignore
Description: 从 `github/gitignore` 项目中获取最新模板。
Latest version: 1.0.3

# await latestGitignore({pool, needs});

从 `github/gitignore` 项目中获取最新模板。[Gitignore API](https://docs.github.com/cn/rest/reference/gitignore) 提供的模板有限。

## 安装

```shell
# 使用 Pnpm
$ pnpm add @iyowei/latest-gitignore

# 使用 NPM
$ npm i @iyowei/latest-gitignore

# 使用 Yarn
$ yarn add @iyowei/latest-gitignore
```

## 使用

- `pool` {Array} 下载链接池，**默认：** `[]`，如果事先没有下载链接，可不提供；
- `needs` {Array} 需被 Git 忽略的内容主题, 参见 [github/gitignore](https://github.com/github/gitignore)，文件名即类型名称，保留大小写，**默认：** `[]`；
- 返回: {Object} 扫描到的文件夹、文件，
  - `error` {Boolean} 出错与否；
  - `message` {String} 操作结果描述；
  - `gitignore` {Array} 下载到的模板，出错时不提供，写入文件前需要先处理成文本串；
  - `downloadUrls` {Array} **所有模板** 的下载链接，出错时不提供；

```javascript
import latestGitignore from 'latest-gitignore';

(async () => {
  const rslt = await latestGitignore({
    needs: [
      "macOS",
      "Windows",
      "Linux",
      "Node",
      "VisualStudioCode",
      "SublimeText",
      "CVS",
      "Diff",
      "Vim",
      "TortoiseGit",
      "Diff",
      "Patch",
    ],
  });

  console.log(rslt);
  /**
   * {
   * error: false,
   * message: "成功获取指定 gitignore 模板",
   * gitignore: ['# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n.env.test\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# Next.js build output\n.next\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and *not* Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n', ...],
   * downloadUrls: ['https://raw.githubusercontent.com/github/gitignore/main/Global/Linux.gitignore', ... ],
  }*/

})();
```
npm package: @iyowei/ls-dir
Description: 并行扫描文件夹。
Latest version: 1.0.1

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[lsdirsync]: https://github.com/iyowei/ls-dir-sync
[lsdir]: https://github.com/iyowei/ls-dir
[scandireachsync]: https://github.com/iyowei/scan-dir-sync
[scandireach]: https://github.com/iyowei/scan-dir-each
[scandirsync]: https://github.com/iyowei/scan-dir-sync
[scandir]: https://github.com/iyowei/scan-dir

# lsDir(path)

> 并行扫描文件夹。

## 使用

- `path` 待扫描的路径，**必需提供**，{String}
- 返回，扫描结果 { `Promise<Array>` }

```js
import { log } from "console";
import lsDir from "@iyowei/ls-dir";

(async () => {
  log(await lsDir(process.cwd()));

  /**
   * [
   *   {
   *     path: '',
   *     dirent: [Dirent]
   *   },
   *   ...
   * ]
   */
})();
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/ls-dir

# yarn
yarn add @iyowei/ls-dir

# npm
npm add @iyowei/ls-dir
```

## 相关

- [**`lsDirSync()`**][lsdirsync]，串行扫描文件夹；
- [**`scanDirEachSync()`**][scandireachsync]，可在扫描的同时更新或过滤数据，**串行** 实现；
- [**`scanDirEach()`**][scandireach]，可在扫描的同时更新或过滤数据，**并行** 实现；
- [**`scanDirSync()`**][scanDirSync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；
- [**`scanDir()`**][scandir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/ls-dir-sync
Description: 串行扫描文件夹。
Latest version: 1.0.2

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

[lsDir]: https://github.com/iyowei/ls-dir
[scanDirEach]: https://github.com/iyowei/scan-dir-each
[scanDirEachSync]: https://github.com/iyowei/scan-dir-each-sync
[scanDirSync]: https://github.com/iyowei/scan-dir-sync
[scanDir]: https://github.com/iyowei/scan-dir

# lsDirSync(path)

> 串行扫描文件夹。

## 使用

- `path` 待扫描的路径，**必需提供**，{String}
- 返回，扫描结果 { Array }

```js
import { log } from "console";
import lsDirSync from "@iyowei/ls-dir-sync";

log(lsDirSync(process.cwd()));

/**
 * [
 *   {
 *     path: '',
 *     dirent: [Dirent]
 *   },
 *   ...
 * ]
 */
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/ls-dir-sync

# yarn
yarn add @iyowei/ls-dir-sync

# npm
npm add @iyowei/ls-dir-sync
```

## 相关

- [**`lsDir()`**][lsDir]，并行扫描文件夹；
- [**`scanDirEach()`**][scanDirEach]，可在扫描的同时更新或过滤数据，**并行** 实现；
- [**`scanDirEachSync()`**][scanDirEachSync]，可在扫描的同时更新或过滤数据，**串行** 实现；
- [**`scanDirSync()`**][scanDirSync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；
- [**`scanDir()`**][scanDir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/not-empty-plain-object
Description: 检查传入参数是不是非空对象字面量。
Latest version: 1.0.0

# notEmptyPlainObject({})

> 检查传入参数是不是非空对象字面量。

## 使用

```js
import { log } from "console";
import notEmptyPlainObject from "@iyowei/not-empty-plain-object";

log(notEmptyPlainObject({})); // false
log(notEmptyPlainObject({ a: "after" })); // true
log(notEmptyPlainObject('')); // false
log(notEmptyPlainObject(123)); // false
```

## 安装

![esm][esm] [![Node Version Badge][node version badge]][download node.js] ![browser][browser]

```shell
# Pnpm
pnpm add @iyowei/not-empty-plain-object

# yarn
yarn add @iyowei/not-empty-plain-object

# npm
npm add @iyowei/not-empty-plain-object
```

## 参与贡献

![PRs Welcome][prs welcome badge]

## 其它

"@iyowei/not-empty-plain-object" 使用 [@iyowei/create-esm][create-esm] 脚手架生成。

[browser]: https://img.shields.io/badge/Browser-orange?style=flat
[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[esm]: https://img.shields.io/badge/ESM-brightgreen?style=flat
[create-esm]: https://github.com/iyowei/create-esm
npm package: @iyowei/not-empty-string
Description: 如果是字符串，并且非空（`''`），则返回 `true`，否则 `false`。
Latest version: 1.0.3

# notEmptyString(str)

> 如果是字符串，并且非空（`''`），则返回 `true`，否则 `false`。

## 使用

```javascript
import notEmptyString from '@iyowei/esm-not-empty-string';

console.log('notEmptyString("")', notEmptyString("")); // false
console.log('notEmptyString("text")', notEmptyString("text")); // true

console.log("notEmptyString(true)", notEmptyString(true)); // false
console.log("notEmptyString(1)", notEmptyString(1)); // false
console.log('notEmptyString(NaN)', notEmptyString(NaN)); // false
console.log('notEmptyString(null)', notEmptyString(null)); // false
```

## 安装

[![Node version](https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js)](https://nodejs.org/en/download/)

```shell
# Pnpm
pnpm add @iyowei/not-empty-string

# yarn
yarn add @iyowei/not-empty-string

# npm
npm add @iyowei/not-empty-string
```

## 参与贡献
![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)
npm package: @iyowei/resolve-virtual-root
Description: 转换 '~/Development/OpenSource' 虚拟路径为绝对路径。
Latest version: 1.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat

# resolveVirtualRoot(path)

> 转换 `~/Development/OpenSource` 虚拟路径为绝对路径。

## 使用

- `path`，{ String }，路径

```js
import { log } from "console";
import resolveVirtualRoot from "@iyowei/resolve-virtual-root";

log(resolveVirtualRoot("~/Development/OpenSource`"));
// /Users/iyowei/Development/OpenSource
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/resolve-virtual-root

# yarn
yarn add @iyowei/resolve-virtual-root

# npm
npm add @iyowei/resolve-virtual-root
```

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/scan-dir
Description: 并行扫描文件夹，可在扫描的同时更新或过滤数据，一定程度复用遍历。
Latest version: 1.0.2

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[lsdirsync]: https://github.com/iyowei/ls-dir-sync
[lsdir]: https://github.com/iyowei/ls-dir
[scandireachsync]: https://github.com/iyowei/scan-dir-sync
[scandireach]: https://github.com/iyowei/scan-dir-each
[scandirsync]: https://github.com/iyowei/scan-dir-sync
[scandir]: https://github.com/iyowei/scan-dir

# scanDir(path, [worker, raw = false])

> 并行扫描文件夹，可在扫描的同时更新或过滤数据，一定程度复用遍历。

## 使用

> 项目中同时使用 [`lsDir()`][lsdir]、[`scanDirEach()`][scandireach] 模块的话，推荐使用当前模块。

- `path` 待扫描的路径，**必需提供**，{String}
- `worker` 处理器，如果扫描的同时需要更新、过滤操作可提供，一定程度复用穷举，**可选**，{ Function }
  - 返回 { Object | Boolean | Promise }
    - `false` 过滤掉当前扫描结果
    - `true` 保留当前扫描结果
    - 对象字面量，保留 / 更新当前扫描结果
    - 如果需要在处理器中需要安放些异步操作，如远程数据请求，可在处理器中返回一个 Promise，该 Promise 可返回，
      - `false` 过滤掉当前扫描结果
      - `true` 保留当前扫描结果
      - 对象字面量，保留 / 更新当前扫描结果
      - 其它类型则默认为没有任何处理
    - 其它类型则默认为没有任何处理
- `raw` 是否专门返回未加工的扫描结果，使用 `worker` 后才会生效，默认 `false`，**可选**，{ Boolean }
- 返回，扫描结果 { Array }
  - 如果设置了 `raw` 为 `true`，则返回 **二维数组**，第一项为加工后的扫描结果，第二项为未加工的扫描结果
  - 默认返回 **一维数组**，即：加工后的扫描结果

```js
import { log } from "console";
import scanDir from "@iyowei/scan-dir";

(async () => {
  const got = await scanDir(
    process.cwd(),
    (cur, index) =>
      new Promise((resolve) => {
        // 可以做些异步操作，如远程数据请求
        resolve(index % 2 === 0 ? cur : false);
      }),
    false
  );

  log(got);

  /**
   * [
   *   {
   *     path: '',
   *     dirent: [Dirent]
   *   },
   *   ...
   * ]
   */
})();
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/scan-dir

# yarn
yarn add @iyowei/scan-dir

# npm
npm add @iyowei/scan-dir
```

## 相关

- [**`lsDirSync()`**][lsdirsync]，串行扫描文件夹；
- [**`lsDir()`**][lsdir]，并行扫描文件夹；
- [**`scanDirEachSync()`**][scandireachsync]，可在扫描的同时更新或过滤数据，**串行** 实现；
- [**`scanDirEach()`**][scandireach]，可在扫描的同时更新或过滤数据，**并行** 实现；
- [**`scanDirSync()`**][scandirsync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/scan-dir-each
Description: 并行扫描文件夹，可在扫描的同时更新或过滤数据，一定程度复用遍历。
Latest version: 1.0.2

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[lsdirsync]: https://github.com/iyowei/ls-dir-sync
[lsdir]: https://github.com/iyowei/ls-dir
[scandireachsync]: https://github.com/iyowei/scan-dir-sync
[scandireach]: https://github.com/iyowei/scan-dir-each
[scandirsync]: https://github.com/iyowei/scan-dir-sync
[scandir]: https://github.com/iyowei/scan-dir

# scanDirEach(path, [worker = () => true, raw = false])

> 并行扫描文件夹，可在扫描的同时更新或过滤数据，一定程度复用遍历。

## 使用

- `path` 待扫描的路径，**必需提供**，{String}
- `worker` 处理器，如果扫描的同时需要更新、过滤操作可提供，一定程度复用穷举，**可选**，{ Function }
  - 返回 { Object | Boolean | Promise }
    - `false` 过滤掉当前扫描结果
    - `true` 保留当前扫描结果
    - 对象字面量，保留 / 更新当前扫描结果
    - 如果需要在处理器中需要安放些异步操作，如远程数据请求，可在处理器中返回一个 Promise，该 Promise 可返回，
      - `false` 过滤掉当前扫描结果
      - `true` 保留当前扫描结果
      - 对象字面量，保留 / 更新当前扫描结果
      - 其它类型则默认为没有任何处理
    - 其它类型则默认为没有任何处理
- `raw` 是否专门返回未加工的扫描结果，使用 `worker` 后才会生效，默认 `false`，**可选**，{ Boolean }
- 返回，扫描结果 { Array }
  - 如果设置了 `raw` 为 `true`，则返回 **二维数组**，第一项为加工后的扫描结果，第二项为未加工的扫描结果
  - 默认返回 **一维数组**，即：加工后的扫描结果

```js
import { log } from "console";
import scanDirEach from "@iyowei/scan-dir-each";

(async () => {
  const got = await scanDirEach(
    process.cwd(),
    (cur, index) =>
      new Promise((resolve) => {
        // 可以做些异步操作，如远程数据请求
        resolve(index % 2 === 0 ? cur : false);
      }),
    false
  );

  log(got);

  /**
   * [
   *   {
   *     path: '',
   *     dirent: [Dirent]
   *   },
   *   ...
   * ]
   */
})();
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/scan-dir-each

# yarn
yarn add @iyowei/scan-dir-each

# npm
npm add @iyowei/scan-dir-each
```

## 相关

- [**`lsDirSync()`**][lsdirsync]，串行扫描文件夹；
- [**`lsDir()`**][lsdir]，并行扫描文件夹；
- [**`scanDirEachSync()`**][scandireachsync]，可在扫描的同时更新或过滤数据，**串行** 实现；
- [**`scanDirSync()`**][scandirsync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；
- [**`scanDir()`**][scandir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/scan-dir-each-sync
Description: 串行扫描文件夹，扫描的同时支持更新、过滤操作，一定程度复用遍历。
Latest version: 1.0.1

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[lsDirSync]: https://github.com/iyowei/ls-dir-sync
[lsdir]: https://github.com/iyowei/ls-dir
[scandireach]: https://github.com/iyowei/scan-dir-each
[scandirsync]: https://github.com/iyowei/scan-dir-sync
[scandir]: https://github.com/iyowei/scan-dir

# scanDirEachSync(path, worker = () => {}, raw = false)

> 串行扫描文件夹，扫描的同时支持更新、过滤操作，一定程度复用遍历。

## 使用

- `path` 待扫描的路径，**必需提供**，{String}
- `worker` 处理器，如果扫描的同时需要更新、过滤操作可提供，一定程度复用穷举，**必需提供**，{ Function }
  - 返回 {Object | Boolean}
    - `false` 过滤掉当前扫描结果
    - `true` 保留当前扫描结果
    - 对象字面量，保留 / 更新当前扫描结果
    - 其它类型则默认为没有任何处理
- `raw` 是否专门返回未加工的扫描结果，默认 `false`，**可选**，{ Boolean }
- 返回，扫描结果 { Array }
  - 如果设置了 `raw` 为 `true`，则返回 **二维数组**，第一项为加工后的扫描结果，第二项为未加工的扫描结果
  - 默认返回 **一维数组**，即：加工后的扫描结果

```js
import { log } from "console";
import scanDirEachSync from "@iyowei/scan-dir-each-sync";

log(
  scanDirEachSync(
    process.cwd(),
    (cur, index) => {
      return index % 2 === 0 ? cur : false;
    },
    true
  )
);

/**
 * [
 *   [
 *     {
 *       path: '',
 *       dirent: [Dirent]
 *     },
 *     ...
 *   ],
 *   [
 *     {
 *       path: '',
 *       dirent: [Dirent]
 *     },
 *     ...
 *   ]
 * ]
 */
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/scan-dir-each-sync

# yarn
yarn add @iyowei/scan-dir-each-sync

# npm
npm add @iyowei/scan-dir-each-sync
```

## 相关
- [**`lsDirSync()`**][lsDirSync]，串行扫描文件夹；
- [**`lsDir()`**][lsdir]，并行扫描文件夹；
- [**`scanDirSync()`**][scandirsync]，`worker` 选填，有 `worker`，行为同 `scanDirEachSync()` 一致，否则与 `lsDirSync()` 一致，如果项目中同时使用了 `scanDirEachSync()`、`lsDirSync()`，则推荐使用 `scanDirSync()`；
- [**`scanDir()`**][scandir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；
- [**`scanDirEach()`**][scandireach]，可在扫描的同时更新或过滤数据，**并行** 实现；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/scan-dir-sync
Description: 串行扫描文件夹，扫描的同时支持更新、过滤操作，一定程度复用遍历。
Latest version: 1.0.2

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[lsdirsync]: https://github.com/iyowei/ls-dir-sync
[lsdir]: https://github.com/iyowei/ls-dir
[scandireach]: https://github.com/iyowei/scan-dir-each
[scandirsync]: https://github.com/iyowei/scan-dir-sync
[scandir]: https://github.com/iyowei/scan-dir
[scandireachsync]: https://github.com/iyowei/scan-dir-sync

# scanDirSync(path, [worker, raw = false])

> 串行扫描文件夹，扫描的同时支持更新、过滤操作，一定程度复用遍历。

## 使用

> 项目中同时使用 [`lsDirSync()`][lsdirsync]、[`scanDirEachSync()`][scandireachsync] 模块的话，推荐使用当前模块。

- `path` 待扫描的路径，**必需提供**，{String}
- `worker` 处理器，如果扫描的同时需要更新、过滤操作可提供，一定程度复用穷举，**可选**，{ Function }
  - 返回 {Object | Boolean}
    - `false` 过滤掉当前扫描结果
    - `true` 保留当前扫描结果
    - 对象字面量，保留 / 更新当前扫描结果
    - 其它类型则默认为没有任何处理
- `raw` 是否专门返回未加工的扫描结果，使用 `worker` 后才会生效，默认 `false`，**可选**，{ Boolean }
- 返回，扫描结果 { Array }
  - 如果设置了 `raw` 为 `true`，则返回 **二维数组**，第一项为加工后的扫描结果，第二项为未加工的扫描结果
  - 默认返回 **一维数组**，即：加工后的扫描结果

```js
import { log } from "console";
import scanDirSync from "@iyowei/scan-dir-sync";

log(
  scanDirSync(
    process.cwd(),
    (cur, index) => {
      return index % 2 === 0 ? cur : false;
    },
    true
  )
);

/**
 * [
 *   [
 *     {
 *       path: '',
 *       dirent: [Dirent]
 *     },
 *     ...
 *   ],
 *   [
 *     {
 *       path: '',
 *       dirent: [Dirent]
 *     },
 *     ...
 *   ]
 * ]
 */
```

## 安装

[![Node Version Badge][node version badge]][download node.js]

```shell
# Pnpm
pnpm add @iyowei/scan-dir-sync

# yarn
yarn add @iyowei/scan-dir-sync

# npm
npm add @iyowei/scan-dir-sync
```

## 相关

- [**`lsDirSync()`**][lsdirsync]，串行扫描文件夹；
- [**`lsDir()`**][lsdir]，并行扫描文件夹；
- [**`scanDirEachSync()`**][scanDirEachSync]，可在扫描的同时更新或过滤数据，**串行** 实现；
- [**`scanDirEach()`**][scandireach]，可在扫描的同时更新或过滤数据，**并行** 实现；
- [**`scanDir()`**][scandir]，`worker` 选填，有 `worker`，行为同 `scanDirEach()` 一致，否则与 `lsDir()` 一致，如果项目中同时使用了 `scanDirEach()`、`lsDir()`，则推荐使用 `scanDir()`；

## 参与贡献

![PRs Welcome][prs welcome badge]
npm package: @iyowei/untildify
Description: 转换 '~/Development/OpenSource' 波浪路径（虚拟路径）为绝对路径。
Latest version: 1.0.0

# @iyowei/untildify

> 转换 "~/Development/OpenSource" 波浪路径（虚拟路径）为绝对路径。

## 使用

### untildify(path)

- `path`，{ String }，波浪路径

```js
import { log } from "console";
import { untildify } from "@iyowei/untildify";

log(untildify("~/Development/OpenSource`"));
// 自动获取系统根目录，/Users/iyowei/Development/OpenSource
```

### untildifyWith(path, replacement)

- `path`，{ String }，波浪路径
- `replacement`，{ String }，指定替换路径

```js
import { log } from "console";
import { untildifyWith } from "@iyowei/untildify";

log(log(untildifyWith('~/iyowei', '/dfafsdf/')););
// /dfafsdf/iyowei
```

## 安装

[![Node Version Badge][node version badge]][download node.js] ![esm][esm]

```shell
# Pnpm
pnpm add @iyowei/untildify

# yarn
yarn add @iyowei/untildify

# npm
npm add @iyowei/untildify
```

## 参与贡献

![PRs Welcome][prs welcome badge]

[node version badge]: https://img.shields.io/badge/node.js-%3E%3D12.20.0-brightgreen?style=flat&logo=Node.js
[download node.js]: https://nodejs.org/en/download/
[prs welcome badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat
[esm]: https://img.shields.io/badge/ESM-brightgreen?style=flat
npm package: @iyue/fe-lint
Description: 前端项目代码质量配置，包含eslint、stylelint、prettier相关配置文件合集
Author: alonezjh@gmail.com
Latest version: 1.0.1

# fe-lint

前端项目代码规范校验配置集，包含 `eslint` 、`stylelint` 、`prettier` 相关配置

> 该模块依赖于 [`@umijs/fabric `](https://github.com/umijs/fabric)

## Install

```bash
yarn add @iyuefe-lint -D
# or
npm install @iyuefe-lint --save-dev
```

## Useage

### `eslint` 配置

在项目根目录下创建 `.eslintrc.js` 文件

```bash
touch .eslintrc.js
```

写入内容

```js
module.exports = {
  extends: [require.resolve('@iyue/fe-lint/dist/eslint')]
};
```

### `stylelint` 配置

在项目根目录下创建 `.stylelintrc.js` 文件

```bash
touch .stylelintrc.js
```

写入内容

```js
module.exports = {
  extends: [require.resolve('@iyue/fe-lint/dist/stylelint')]
};
```

### `prettier` 配置

在项目根目录下创建 `.prettierrc.js` 文件

```bash
touch .prettierrc.js
```

写入内容

```js
const { prettier } = require('@iyue/fe-lint');

module.exports = {
  ...prettier,
};
```
npm package: @iyulab/components
Description: web-components library based on lit-element made by iyulab
Author: iyulab
Latest version: 1.0.3

# @iyulab/components

Lit 기반 웹 컴포넌트 라이브러리.

[데모 사이트](https://components.iyulab.com)에서 모든 컴포넌트를 직접 확인할 수 있습니다.

## Installation

```bash
npm install @iyulab/components
```

## Usage

```ts
// 전체 import
import '@iyulab/components';

// 개별 import
import '@iyulab/components/u-button';
import '@iyulab/components/u-input';
```

## Skills Usage

LLM 코딩 에이전트(Claude Code, GitHub Copilot, Cursor 등)를 위한 스킬을 제공합니다.

```bash
# GitHub에서 설치
npx skills add iyulab/node-components

# 패키지 설치 후 로컬에서 참조
npx skills add ./node_modules/@iyulab/components
```

## Components

**Feedback** — `u-alert`, `u-badge`, `u-spinner`, `u-skeleton`, `u-progress-bar`, `u-progress-ring`

**Buttons & Actions** — `u-button`, `u-button-group`, `u-icon-button`, `u-chip`

**Form Controls** — `u-input`, `u-textarea`, `u-select`, `u-checkbox`, `u-radio`, `u-switch`, `u-slider`, `u-rating`, `u-field`, `u-form`, `u-option`

**Overlay & Floating** — `u-dialog`, `u-drawer`, `u-popover`, `u-tooltip`

**Navigation** — `u-menu`, `u-menu-item`, `u-tab-panel`, `u-breadcrumb`, `u-breadcrumb-item`, `u-tree`, `u-tree-item`

**Layout & Display** — `u-avatar`, `u-card`, `u-carousel`, `u-divider`, `u-icon`, `u-panel`, `u-split-panel`, `u-tag`

## Theming

```ts
import { Theme } from '@iyulab/components';

await Theme.init({
  default: 'system',       // 'light' | 'dark' | 'system'
  useBuiltIn: true,        // 내장 light/dark CSS 사용
  store: { type: 'localStorage', prefix: 'my-app' },
});

Theme.set('dark');
Theme.set('system');
```

모든 CSS 변수는 `--u-` 접두사를 사용하며 `:root`에서 재정의할 수 있습니다.

```css
:root {
  --u-blue-600: #3B82F6;
  --u-font-base: 'Pretendard', sans-serif;
}
```

자세한 내용은 [docs/theming.md](./docs/theming.md)를 참고하세요.

## Documentation

| 문서 | 내용 |
|------|------|
| [docs/architecture.md](./docs/architecture.md) | 패키지 구조 및 클래스 계층 |
| [docs/guidelines.md](./docs/guidelines.md) | 컴포넌트 개발 가이드라인 |
| [docs/events.md](./docs/events.md) | 이벤트 시스템 카탈로그 |
| [docs/theming.md](./docs/theming.md) | 테마 및 CSS 변수 |
| [docs/form-controls.md](./docs/form-controls.md) | 폼 연동 및 검증 API |
| [docs/icons.md](./docs/icons.md) | 아이콘 등록 및 사용 |

## License

MIT © [iyulab](https://www.iyulab.com)
npm package: @iyulab/data-components
Description: iyulab data visualization components
Author: iyulab
Latest version: 0.3.1

# @iyulab/data-components

데이터 표시 및 입력을 위한 웹 컴포넌트 라이브러리.

**[Live Demo](https://iyulab.github.io/node-data-components/)**

- **USimpleSheet** — 엑셀 호환 스프레드시트 입력 컴포넌트 (Lit, compute 자동 계산 지원)
- **UDataView** — Grid / List / Table 뷰 전환 컴포넌트 (Lit)
- **UDataGrid** — OData 기반 서버 사이드 데이터 그리드 (React + DevExtreme)

## Installation

```bash
npm install @iyulab/data-components
```

## Quick Start

### USimpleSheet

```html
<u-simple-sheet
  style="height: 300px;"
  .rows=${20}
  .cols=${8}
  @change=${(e) => console.log(e.detail.data)}
></u-simple-sheet>
```

컬럼 정의 + 초기 데이터:

```html
<u-simple-sheet
  style="height: 400px;"
  .columns=${[
    { key: 'name',  label: '이름',   width: 150 },
    { key: 'email', label: '이메일', width: 220 },
  ]}
  .data=${[
    ['홍길동', 'hong@example.com'],
    ['김철수', 'kim@example.com'],
  ]}
  @change=${(e) => console.log(e.target.getDataAsObjects())}
></u-simple-sheet>
```

자동 계산 열 (compute):

```html
<u-simple-sheet
  .columns=${[
    { key: 'item',  label: '품목', width: 150 },
    { key: 'qty',   label: '수량', width: 80 },
    { key: 'price', label: '단가', width: 100 },
    { key: 'total', label: '합계', width: 100,
      compute: (r, data) => {
        const qty = Number(data[r][1]) || 0;
        const price = Number(data[r][2]) || 0;
        return String(qty * price);
      }
    },
  ]}
></u-simple-sheet>
```

### UDataView

```html
<u-data-view
  .items=${myData}
  mode="grid"
  @select=${(e) => console.log(e.detail)}
></u-data-view>
```

### UDataGrid (React)

```tsx
import { UDataGrid } from '@iyulab/data-components';

<UDataGrid
  dataSourceUrl="https://api.example.com/odata/products"
  keyField="id"
  columns={[
    { dataField: 'name',  caption: '상품명' },
    { dataField: 'price', caption: '가격', dataType: 'number' },
  ]}
/>
```

## Documentation

- [USimpleSheet](./docs/USimpleSheet.md)
- [UDataView](./docs/UDataView.md)
- [UDataGrid](./docs/UDataGrid.md)

## Theming

`@iyulab/components`의 테마 시스템을 사용합니다. 라이트/다크 모드 자동 지원.

```typescript
import { Theme } from '@iyulab/components';

Theme.init({ default: 'system' });
Theme.set('dark'); // 'light' | 'dark' | 'system'
```

## License

MIT
npm package: @iyulab/enterprise
Description: Enterprise utilities and components for iyulab framework
Author: iyulab
Latest version: 0.1.1

# @iyulab/enterprise

Enterprise utilities and components for iyulab framework.

## Installation

```bash
npm install @iyulab/enterprise
```

## Usage

```typescript
import { } from '@iyulab/enterprise';
```

## Development

```bash
# Build
npm run build
```

## License

MIT
npm package: @iyulab/json-collection
Description: A json collection pipeline library that mimics the MongoDB pipeline syntax.
Author: iyulab
Latest version: 0.1.3

# json-collection

This library provides a simplified simulation of MongoDB's aggregation and query framework in TypeScript. It enables filtering, grouping, sorting, and limiting of in-memory data collections, mimicking the behavior of MongoDB database operations but in a lightweight, local context.

## Installation

To use the Json Collection library in your project, install it via npm. Execute the following command in your project directory:

```bash
npm install @iyulab/json-collection
```

Make sure you have Node.js and npm installed on your system. You can download and install Node.js (npm included) from https://nodejs.org/.

## Features

The Json Collecgtion library provides the following features:

- Filtering ($match): Filter your data based on specified criteria.
- Grouping and Aggregation ($group): Group your data by specific fields and perform various aggregation operations like counting, summing, averaging, etc.
- Sorting ($sort): Sort your data based on one or more fields.
- Limiting ($limit): Limit the number of documents to return.
- Finding ($find): Retrieve documents from your data based on filtering, sorting, and limiting criteria, simulating the MongoDB find operation.

## Usage

Below is a simple example demonstrating how to use the Json Collection library to perform data operations:

```typescript
import {
  JsonCollection,
  AggregationOptions,
  FindOptions,
} from "@iyulab/json-collection";

// Sample data
const data = [
  { id: 1, name: "Alice", age: 30 },
  { id: 2, name: "Bob", age: 25 },
  { id: 3, name: "Charlie", age: 35 },
  { id: 4, name: "David", age: 40 },
];

// Aggregation example
const aggOptions: AggregationOptions = {
  $match: { age: { $gt: 30 } }, // Filtering: age greater than 30
  $group: { _id: "$age" }, // Grouping by age
  $sort: { age: 1 }, // Sorting by age in ascending order
  $limit: 2, // Limiting to 2 documents
};

const collection = new JsonCollection(data);
const aggResult = collection.aggregate(aggOptions);
console.log(aggResult);

// Find example
const findOptions: FindOptions = {
  $match: { name: { $eq: "Alice" } }, // Filtering: name equals Alice
  $sort: { age: -1 }, // Sorting by age in descending order
  $limit: 1, // Limiting to 1 document
};

const findResult = collection.find(findOptions).toArray();
console.log(findResult);
```

This will output the processed data based on the provided aggregation options.

- See [Find Tests](./tests/Find.test.ts)
- See [Aggregate Tests](./tests/Aggregate.test.ts)

## Contribution

Contributions are welcome! Please feel free to submit pull requests or open issues to improve the library or add new features.

## License

This project is licensed under the MIT License - see the LICENSE.md file for details.
npm package: @iyulab/mloop-mcp
Description: MCP server for MLoop CLI - ML.NET MLOps tool
Author: iyulab
Latest version: 0.2.1

# mloop-mcp

MCP (Model Context Protocol) server for [MLoop](https://github.com/iyulab/MLoop) CLI.

Enables AI clients (Claude, Cursor, ironhive-cli) to perform MLOps tasks using MLoop's AutoML capabilities.

## Installation

```bash
npm install -g @iyulab/mloop-mcp
```

Or run directly with npx:

```bash
npx @iyulab/mloop-mcp
```

## Prerequisites

- Node.js 18+
- MLoop CLI installed and available in PATH
  ```bash
  dotnet tool install -g mloop
  ```

### Custom MLoop Path

If MLoop is not in PATH, set the `MLOOP_PATH` environment variable:

```bash
# Windows
set MLOOP_PATH=D:\lib\mloop.exe

# Linux/macOS
export MLOOP_PATH=/usr/local/bin/mloop
```

## Configuration

### For Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "mloop": {
      "command": "npx",
      "args": ["@iyulab/mloop-mcp"]
    }
  }
}
```

### For ironhive-cli

Add to `.ironhive/plugins.yaml`:

```yaml
plugins:
  mloop:
    transport: stdio
    command: npx
    args:
      - "@iyulab/mloop-mcp"
```

## Available Tools

| Tool | Description |
|------|-------------|
| `mloop_train` | Train ML models using AutoML |
| `mloop_predict` | Run predictions with trained models |
| `mloop_list` | List experiments and their metrics |
| `mloop_promote` | Promote an experiment to production |
| `mloop_info` | Analyze and profile datasets |
| `mloop_status` | Show project status |
| `mloop_compare` | Compare multiple experiments |
| `mloop_evaluate` | Evaluate model performance |
| `mloop_serve` | Start REST API server |

## Tool Examples

### Train a model

```json
{
  "tool": "mloop_train",
  "arguments": {
    "projectPath": "/path/to/project",
    "dataFile": "datasets/train.csv",
    "label": "target",
    "task": "binary-classification",
    "time": 60
  }
}
```

### Run predictions

```json
{
  "tool": "mloop_predict",
  "arguments": {
    "projectPath": "/path/to/project",
    "dataFile": "datasets/test.csv",
    "output": "predictions/output.csv"
  }
}
```

### List experiments

```json
{
  "tool": "mloop_list",
  "arguments": {
    "projectPath": "/path/to/project",
    "showAll": true
  }
}
```

### Promote to production

```json
{
  "tool": "mloop_promote",
  "arguments": {
    "projectPath": "/path/to/project",
    "experimentId": "exp-003",
    "force": true
  }
}
```

### Analyze dataset

```json
{
  "tool": "mloop_info",
  "arguments": {
    "dataFile": "datasets/train.csv",
    "projectPath": "/path/to/project"
  }
}
```

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Run locally
npm start

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.js
```

## Architecture

```
ironhive-cli ──[MCP/STDIO]──> mloop-mcp ──[subprocess]──> mloop CLI ──> ML.NET
```

- **Pure Bridge Pattern**: 1:1 CLI mapping, no business logic, stateless
- **STDIO Transport**: Simple process communication
- **Subprocess Execution**: Each tool call spawns `mloop` CLI

## License

MIT
npm package: @iyulab/template-binding
Description: iyulab template binding
Author: iyulab
Latest version: 0.1.9

# template-binding

## Install
[NPM](https://www.npmjs.com/package/@iyulab/template-binding)
```bash
npm install @iyulab/template-binding
```

## How to use

```typescript
import { bind } from '@iyulab/template-binding';

const props = {
  innerText: "{{title}}",
  style: { "background": "{{color}}" }
};
const data = {
  title: "hello",
  color: "red"
};

bind.binding({
  target: this.header, // h1, div, DOM-element, anything...
  props: props,
  data: data
});
```

## Use Expression Syntax

This library uses the JSONata expression syntax.
See https://docs.jsonata.org/overview.html


## Observable
object to an Observable object with a callback function.
```typescript
import { observable } from '@iyulab/template-binding';

function onChangedValue(data: any, onChangedValue: any): any {
  console.log('onChangedValue', data, onChangedValue);
}

const data = {
  title: "hello"
};
observable(data, onChangedValue);

data.title = "world";
```
Log
```log
onChangedValue {title: 'world'}title: "world"[[Prototype]]: Object {property: 'title', oldValue: 'hello', value: 'world'}
```

## And more...
See the sample site https://template-binding.github.io/
npm package: @iyulab/u-widgets-mcp
Description: MCP server for the u-widgets declarative widget system (uw-* internal prefix)
Latest version: 0.2.6

# @iyulab/u-widgets-mcp

MCP (Model Context Protocol) server for the [u-widgets](https://github.com/iyulab/u-widgets) declarative widget system.

Exposes u-widgets' developer tools as MCP tools, enabling AI assistants to create, validate, and suggest data-driven widget specs.

## Tools

| Tool | Description |
|------|-------------|
| `help` | List available widget types. Filter by name or category. |
| `template` | Generate a minimal, valid widget spec with sample data. |
| `validate` | Check a widget spec for errors and warnings. |
| `suggest_mapping` | Analyze data and suggest the best widget type + mapping. |
| `auto_spec` | Generate a complete spec from raw data (one-call convenience). |

## Installation

```bash
npm install -g @iyulab/u-widgets-mcp
```

Or run directly with npx:

```bash
npx @iyulab/u-widgets-mcp
```

## Configuration

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "u-widgets": {
      "command": "npx",
      "args": ["-y", "@iyulab/u-widgets-mcp"]
    }
  }
}
```

### Claude Code

Add to your `.claude/settings.json` or project `.mcp.json`:

```json
{
  "mcpServers": {
    "u-widgets": {
      "command": "npx",
      "args": ["-y", "@iyulab/u-widgets-mcp"]
    }
  }
}
```

### VS Code (Copilot)

Add to `.vscode/mcp.json`:

```json
{
  "servers": {
    "u-widgets": {
      "command": "npx",
      "args": ["-y", "@iyulab/u-widgets-mcp"]
    }
  }
}
```

## Tool Examples

### help

```
List all widget types:
→ help()

List chart types only:
→ help({ widget: "chart" })

Get details for a specific widget:
→ help({ widget: "chart.bar" })
```

### template

```
Generate a bar chart template:
→ template({ widget: "chart.bar" })

Result:
{
  "widget": "chart.bar",
  "data": [{ "category": "A", "value": 30 }, ...],
  "mapping": { "x": "category", "y": "value" }
}
```

### validate

```
Check if a spec is valid:
→ validate({ spec: { "widget": "metric", "data": { "value": 42 } } })

Result:
{ "valid": true, "errors": [], "warnings": [] }
```

### suggest_mapping

```
Get widget suggestions for your data:
→ suggest_mapping({ data: [{ "name": "A", "value": 30 }, { "name": "B", "value": 70 }] })

Result:
[
  { "widget": "chart.bar", "confidence": 0.9, "mapping": { "x": "name", "y": "value" }, ... },
  { "widget": "chart.line", ... },
  ...
]
```

### auto_spec

```
Generate a complete spec from data:
→ auto_spec({ data: [{ "quarter": "Q1", "revenue": 100 }, { "quarter": "Q2", "revenue": 150 }] })

Result:
{
  "widget": "chart.bar",
  "data": [{ "quarter": "Q1", "revenue": 100 }, ...],
  "mapping": { "x": "quarter", "y": "revenue" }
}
```

## Development

```bash
cd mcp

# Install dependencies
npm install

# Run in development mode
npm run dev

# Run tests
npm test

# Build
npm run build

# Interactive testing with MCP Inspector
npm run inspect
```

## License

MIT
npm package: @iyyafi/depanlayar-design-system
Description: testing svelte lib
Author: Iyyafi Qolbi
Latest version: 0.0.2

# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npx sv create

# create a new project in my-app
npx sv create my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

To create a production version of your app:

```bash
npm run build
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.

## Bundle package

```bash
pnpm package
```

## Update version in package json

```bash
pnpm version patch
```

## Publish in npm package

```bash
pnpm publish --access public
```