open-index/open-npm huggingface dataset:
npm package: @mckou/utils
Description: > Common JavaScript utility functions for Date, File, Number, String, Array, Object, Function, Browser and more.   > Lightweight, TypeScript ready, and easy to use in both Vue and plain JS projects.
Latest version: 0.0.9

# @mckou/utils

> Common JavaScript utility functions for Date, File, Number, String, Array, Object, Function, Browser and more.  
> Lightweight, TypeScript ready, and easy to use in both Vue and plain JS projects.

[![npm version](https://img.shields.io/npm/v/@mckou/utils.svg)](https://www.npmjs.com/package/@mckou/utils)
[![License](https://img.shields.io/npm/l/@mckou/utils.svg)](LICENSE)

---

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
    - [Date Utils](#date-utils)
    - [File Utils](#file-utils)
    - [Number Utils](#number-utils)
- [License](#license)

---

## Installation

```bash
npm install @mckou/utils
```

or

```bash
yarn add @mckou/utils
```

# Usage

## Date Utils

```javascript
import { mDate } from '@mckou/utils'

const now = new Date()

// Format date
mDate.format(now, 'YYYY-MM-DD') // "2026-02-02"

// Add days
mDate.addDays(now, 7) // Date object 7 days later

// Calculate difference in days
mDate.diffDays('2026-02-02', '2026-02-10') // 8
```

## File Utils

```javascript
import { mFile } from '@mckou/utils'

// Download a file by URL
mFile.downloadByUrl('https://example.com/file.pdf', 'example.pdf')

// Download a file as Blob from API
mFile.downloadByBlob('/api/file/123', 'report.docx')
```

## Number Utils

```javascript
import { mNumber } from '@mckou/utils'

// Validate numbers. VueValidate 再方法后面追加Rule即可 mNumber.isIntGtZeroRule
mNumber.isIntGtZero(10) // true
mNumber.isIntGteZero(0) // true
mNumber.isInteger(-5) // true
mNumber.isNumberGteZero(0.5) // true
mNumber.isNumberInRange(5, 1, 10) // true
mNumber.isDecimalPlaces(3.14, 2) // true
mNumber.isPercent(99.99) // true
```
npm package: @mckravchyk/event-emitter
Description: A typed event emitter for Node.js and the browser with a simple to use unsubscribe mechanism
Author: Maciej Krawczyk
Latest version: 1.0.0

# event-emitter

A typed event emitter for Node.js and the browser with a simple to use unsubscribe mechanism.

```bash
npm install @mckravchyk/event-emitter --save
```

## Example

```ts
import { EventEmitter } from '@mckravchyk/event-emitter';

interface Events {
  resize: [width: number, height: number]
}

const emitter = new EventEmitter<Events>();

const off = emitter.on('resize', (e, width, height) => { console.log(`Resize ${width} x ${height}`); });

emitter.emit('resize', 100, 200);
emitter.emit('resize', 200, 100);

off(); // Remove the listener
```
npm package: @mclb/lending-api
Description: This API is the [typechain for ethers with multicall](https://github.com/HOVOH/TypeChain/tree/master/packages/target-ethers-multicall) bindings  bundled together using [EVMContractsRegistry](https://github.com/HOVOH/web3-services/tree/release/packages/EVM
Author: HOVOH
Latest version: 0.1.0-rc.6

# Millenium Club Lending API

This API is the [typechain for ethers with multicall](https://github.com/HOVOH/TypeChain/tree/master/packages/target-ethers-multicall) bindings 
bundled together using [EVMContractsRegistry](https://github.com/HOVOH/web3-services/tree/release/packages/EVMContractsRegistry)

## Features
- Typescript typings
- Contract addresses included
- Multichain
- Multicalls

## How to use

### install
`yarn add @mclb/lending-api ethers @hovoh/ethcall`

@hovoh/ethcall is a package for multicalls. If you're not using multicalls you don't need to install it.

### Using the api
Initialise your ProvidersRegistry from [EVMContractsRegistry](https://github.com/HOVOH/web3-services/tree/release/packages/EVMContractsRegistry)
and use the initMaiApi(providers: ProviderRegistry) to initialise the API.

```typescript
import {providers} from "@hovoh/evmcontractsregistry";
import {initLendingClubApi, LendingClubApi} from "@mclb/lending-api";

const lcApi: LendingClubApi = initLendingClubApi(providers);
```

The LendingClubApi object has two NetworkContractsRegistry: 
1. `vaults` has all the vaults
2. `peripherals` has all the other contracts. It also has the bindings to call arbitrary vaults.

**Examples:**

To query a vault (using multicalls):
```typescript
        const [symbol, closingFee] = await vaults.forNetwork(Network.OPERA_MAINNET).multiCall((get) => [
            get("WFTMVault").symbol(),
            get("WFTMVault").closingFee()
        ])
```

To query vault available funds:
```typescript
import {Network} from "@hovoh/evmcontractsregistry";
const wftmVault = lcApi.vaults.forNetwork(Network.OPERA_MAINNET)
    .getContractInstance("WFTMVault");
const maiBorrowAvailable = maiApi.peripherals.forNetwork(Network.OPERA_MAINNET).getContractInstance("mUSD").balanceOf(wftmVault.address)
```

## Publishing

Publishing is done automatically via a Github Action every time the version in the package.json is increased.
npm package: @mclc/yggdrasil
Description: Add Yggdrasil support to minecraft-launcher-core
Author: PadowYT2
Latest version: 1.0.0-beta.1

# Yggdrasil for MCLC

<a href="https://npm.im/@mclc/yggdrasil"><img height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/npm_vector.svg"></a>
<a href="https://discordlookup.com/user/684472142804549637"><img height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/social/discord-singular_vector.svg"></a>

This package is designed to work with [MCLC](https://npm.im/minecraft-launcher-core) to add Yggdrasil support.

## Installation

```bash
# npm
npm i minecraft-launcher-core

# Yarn
yarn add minecraft-launcher-core

# pnpm
pnpm add minecraft-launcher-core
```

## Usage

```js
import Yggdrasil from '@mclc/yggdrasil';
import { Client } from 'minecraft-launcher-core';
import { v4 } from 'uuid';

const auth = new Yggdrasil('https://url.to/yggdrasil/authserver');
const authorization = await auth.authenticate({
    username: 'john@example.com',
    password: 'password',
    clientToken: v4(),
});

const client = new Client({
    // These arguments are only for the authentication
    authorization,
    customArgs: ['-javaagent:/path/to/authlib-injector.jar=https://url.to/yggdrasil'],
});

client.launch();
```