open-index/open-npm huggingface dataset:
npm package: @legit/fp-helpers
Description: A few utility functions for functional programming.
Author: Simeon Vincent
Latest version: 1.0.0

# Intent

I ([Simeon](https://github.com/svincent)) created this lib while trying to get more familiar with functional programming. It seemed like a good excuse to get more familiar with FP, ES6 modules, npm/GH organizations, and publishing to npm.


# Alternatives

If you're looking for a library to help with functional programming, you may want to check out [Ramda](https://github.com/ramda/ramda), [lodash/fp](https://github.com/lodash/lodash/wiki/FP-Guide), or one of the [many other options](https://github.com/stoeffel/awesome-fp-js) out there.
npm package: @leglaine/colorizer
Description: A simple, zero-dependency colorizer for terminal output.
Author: Lexi Wright
Latest version: 1.0.0

# colorizer

A simple, zero-dependency colorizer for terminal output.

## usage

1. Install colorizer

```
npm install colorizer
```

2. Require color function

```
const { color } = require("colorizer");
```

3. Use color function

```
console.log(color("red", "error: something went wrong"))
```

## colors

The currently supported colors are:

- black
- white
- red
- orange
- yellow
- green
- blue
- purple
- pink
npm package: @legnoh/homebridge-natureremo-fan
Description: homebridge nature remo accessory for fan control
Author: Ryoma Kai
Latest version: 1.0.5

# homebridge-natureremo-fan

- homebridge NatureRemo Cloud API specialized FAN control plugin
- forked from [mizuka-ninomae/homebridge-nature-remo-cloud-fan](https://github.com/mizuka-ninomae/homebridge-nature-remo-cloud-fan)

## function

- speed
  - OFF(0%)
  - LOW(33%)
  - MIDDLE(66%)
  - HIGH(100%)
- direction
  - CLOCKWISE
  - COUNTERCLOCKWISE

## config

```json
  "accessories": [
      {
          "accessory": "NatureRemoFan",
          "name": "Fan",
          "access_token": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
          "high_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "middle_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "low_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "off_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "clockwise_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
          "c_clockwise_signal_ID": "XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
      },
  ]
```
npm package: @legns/leg-cesium-tool
Description: cesium工具 测距 面积 测高
Author: LEG
Latest version: 1.0.1

# leg-cesium-tool
cesium工具 测距 面积 测高

## 版本
1.0.0 在要是使用的方引入即可
```js
import { addPoint, getHeight, polygon, polyline } from "@legns/leg-cesium-tool";
function toolOption(type: string, land = false) {
  data.toolShow = type;
  switch (data.toolShow) {
    case 'point':
      addPoint({
        viewer: cesiumClass.viewer,
        entity: {
          label: {
            text: `经度: {a.toFixed(2)}\n纬度: {b.toFixed(2)}\n高度: {c.toFixed(2)}米`,
          }
        }
      }, (e) => {
        data.toolShow = '';
      })
      break;
    case 'polyline':
      polyline({
        viewer: cesiumClass.viewer,
        entity: {
          label: { text: '长度{a.toFixed(1)}mm' }
        },
      }, (e) => {
        console.log(e)
        data.toolShow = '';
      })
      break;
    case 'polylineLand':
      polyline({
        viewer: cesiumClass.viewer,
        entity: {
          // high:10,
          polyline: { clampToGround: true },
          label: { text: '长度{a.toFixed(1)}mm' }
        },
      }, (e) => {
        console.log(e)
        data.toolShow = '';
      })
      break;
    case 'polygon':
      polygon({
        viewer: cesiumClass.viewer,
      }, (e) => {
        console.log(e)
        data.toolShow = '';

      })
      break;
    case 'high':
      getHeight({
        viewer: cesiumClass.viewer,
        entity: {
          label: {
            a: '高度{a.toFixed(1)}米',
            b: '水平距离{b.toFixed(2)}米',
            c: '空间距离{c.toFixed(2)}米',
          }
        }

      }, (e: any) => {
        console.log(e);
        data.toolShow = '';
      });
      break;
    default:
      break;
  }
  console.log(`当前工具: ${data.toolShow}`);

}

```
有其他bug问题请反馈[https://gitee.com/Lucky8Guy/LEG/issues](https://gitee.com/Lucky8Guy/LEG/issues)
或QQ 1334199284
npm package: @legns/leg-wx-page
Description: 微信小程序 魔改 写法
Author: LEG
Latest version: 1.0.6

# leg-wx-page
微信小程序 魔改 写法
## 版本
1.0.6 新增加自定义修改优化
```js
//app.ts中添加
//onLaunch的globalThis仍需要（防止出错，毕竟官方没有说支持globalThis）
const leg = require('@legns/leg-wx-page') as any;

// demo为自定义的如果不自定义则不需要 调用leg.set()方法
const demo = require('./utils/demo')
leg.set(demo)

//demo.ts
module.exports = {
    page: {
        /**
         第一个写法
         只会执行此方法 你在调用页面写的Message函数会失效
        */
        Messages() {
            return function (q: any) {
                setTimeout(() => {
                    wx.showToast({
                        title: q.title,
                        icon: 'none',
                        duration: q.time || 2000
                    });
                }, 200);
            };
        },
        /**
         第二个写法
         都会执行 先执行此函数
         在执行你在调用页面的函数
        */
        Message(message: any) {
            return function (q: any) {
                //判断当前页面是否有这个函数
                if (!message) {
                    setTimeout(() => {
                        wx.showToast({
                            title: q.title,
                            icon: 'none',
                            duration: q.time || 2000
                        });
                    }, 200);
                } else {
                    //有就返回
                    return message.call(this, q, { a: 123 })
                }
            };
        }
    },
    wx: {
        //改写或添加自己的方法 wx.调用
        navigateToProxy(navigateTo: any): any {
            return function newNavigateTo(object: any) {
                let param = myParamToJson(object.param);
                object.url = object.url + "?param=" + JSON.stringify(param)

                return navigateTo({
                    ...object,
                });
            };
        }
    }
}

```

1.0.5  leg.data产生的bug修复优化
## 安装
```
npm install leg-wx-page --save
```
## 使用
```js
用法1：
    在app.js/ts中引用即可
    require('@legns/leg-wx-page')
用法2：
    在app.js/ts中引用即可
    const leg = require('@legns/leg-wx-page')
    并在onLaunch写入
    if (typeof globalThis === 'undefined') {
      Object.defineProperty(globalThis, "leg", {
        get() {
          return leg
        },
        configurable: false,
        enumerable: false
      });
    } else {
      //@ts-ignore
      globalThis.leg = leg;
    }
```
## 魔改了以下方法与生命周期
```js
公共的有
    onLoad
    myBack
    goto
    clear
    Message
    onShow
用法2添加了 this.setData 的另一种写法
但没有修原 this.setData (改过this.data但太耗性能了)用法如下：
    leg.data={time:{asd:321}}
    leg.data.time.asd=123
    leg.data.end.name.toFixed(3)
    leg.data['time[0].asd']
    可正常如js复制写且能动态渲染

ts:需在typings/types/wx/lib.wx.page.d.ts中添加[name: string]: any 在47行左右
    interface ILifetime {
      [name: string]: any
```
有其他bug问题请反馈[https://gitee.com/Lucky8Guy/LEG/issues](https://gitee.com/Lucky8Guy/LEG/issues)
或QQ 1334199284
npm package: @legns/qqmap-wx-jssdk
Description: 腾讯地图 微信小程序js SDK ## 安装 ``` npm install qqmap-wx-jssdk --save ``` ## 使用 ```js var QQMapWX = require('qqmap-wx-jssdk') qqmapsdk = new QQMapWX({     key: '申请的key' }) ``` ## 其他API 参考[腾讯地图微信小程序jsSDK文档](http://lbs.qq.com/qqmap_wx_jssdk/index.html)
Author: LEG
Latest version: 1.2.1

# qqmap-wx-jssdk
腾讯地图 微信小程序js SDK
## 安装
```
npm install qqmap-wx-jssdk --save
```
## 使用
```js
var QQMapWX = require('qqmap-wx-jssdk')
qqmapsdk = new QQMapWX({
    key: '申请的key'
})
```
## 其他API
参考[腾讯地图微信小程序jsSDK文档](http://lbs.qq.com/qqmap_wx_jssdk/index.html)
npm package: @lego-box/shell
Description: Piral microfrontend shell for Lego Box - provides authentication, PocketBase integration, RBAC, and shared UI components
Author: Lego Box
Latest version: 1.0.24

# @lego-box/shell

Piral microfrontend shell providing authentication, PocketBase integration, RBAC, and shared UI components for the Lego Box ecosystem.

## Installation

```bash
npm install @lego-box/shell
# or
pnpm add @lego-box/shell
```

## Usage

### Creating a Pilet

```bash
pilet new @lego-box/shell --target my-pilet
cd my-pilet
pnpm install
pnpm start
```

### Pilet Development

```typescript
import type { PiletApi } from '@lego-box/shell/pilet';

export function setup(app: PiletApi) {
  // Access authentication
  const user = app.auth.getUser();
  
  // Access PocketBase
  const records = await app.pocketbase.collection('items').getList();
  
  // Register protected pages
  app.registerProtectedPage('/my-route', MyPage, {
    action: 'read',
    subject: 'items'
  });
  
  // Register sidebar menu
  app.registerSidebarMenu({
    id: 'my-menu',
    label: 'My Feature',
    href: '/my-route',
    action: 'read',
    subject: 'items'
  });
}
```

## Shared Dependencies

The shell provides these dependencies to all pilets:
- `@lego-box/ui-kit` - Reusable UI components
- `pocketbase` - Backend SDK
- `piral-auth` - Authentication plugin
- `react` & `react-dom` - UI framework

## API Reference

See [full documentation](link-to-docs) for complete API reference.

## License

MIT
npm package: @lego-box/ui-kit
Description: Reusable UI component library for Lego Box - Tailwind CSS components with dark mode support
Author: Lego Box
Latest version: 0.1.10

# @lego-box/ui-kit

Reusable UI component library for Lego Box applications. Built with React, TypeScript, and Tailwind CSS.

## Installation

```bash
pnpm add @lego-box/ui-kit
# or
npm install @lego-box/ui-kit
```

## Usage

Import components directly:

```tsx
import { Button, Card, Input } from '@lego-box/ui-kit';

function MyComponent() {
  return (
    <Card>
      <Input placeholder="Enter text" />
      <Button>Submit</Button>
    </Card>
  );
}
```

CSS is automatically injected - no need to import stylesheets manually.

## Components

- **Form Components:** Button, Input, Checkbox, Label, Select, PasswordInput
- **Layout Components:** Card, Dialog, Tabs, AdminShell, TopBar, SideNav
- **Data Display:** DataTable, GroupedTable, Badge, StatusBadge, Pagination
- **User Management:** UserFormDialog, RoleFormDialog, PermissionFormDialog
- **Feedback:** Loading, NotFound, AccessDenied, Tooltip
- **And many more...**

## Theming

The library uses CSS variables for theming. Supports light and dark modes out of the box.

## License

MIT
npm package: @lego-ds/core
Description: Lego-ds Core Component Library
Author: Victor Caetano
Latest version: 1.4.0

# `@lego-ds/core`

Lego.ds is an open-source Design System project based on building blocks to create an amazing cross-platform digital experiences.

🚀 Look our amazing repository: [Lego.ds on Github](https://github.com/victormath12/lego-ds)

## Usage

```js
import { applyPolyfills, defineCustomElements } from '@lego-ds/core/loader';

applyPolyfills().then(() => {
  defineCustomElements()
})
```