open-index/open-npm huggingface dataset:
npm package: @mojang/i18n-scripts
Description: Scripts for internationalization flow
Latest version: 2.1.2

# i18n scripts

## Contributing

We are not accepting external contributions at this point in time.

## Prerequisites

To work correctly this package requires a `gettext` installation.

## Install

```console
$ npm i @mojang/i18n-scripts
```

## Scripts
___

### add-missing-en

Adds english default translation using keys in `pot` file as base translation.

__example__

```console
$ add-missing-en
```
___

### merge-translations

Helper function around gettext `msgmerge`.

__example__

```console
$ merge-translations
```
___

### generate-json

Generates json files from `po` files that can be consumed by [Jed](https://github.com/messageformat/Jed).

| flag                          | action                                          |
|-------------------------------|-------------------------------------------------|
| --o (optional)                | When set, sets output file                      |
| --lowercase (optional)        | When set, produces lowercase filename           |
| --escape-percentage (optional)| When set, appends extra percentage sign         |
| --filenamesMap (optional)     | When set, reads file name maps from a json file |

__example__

```console
$ generate-json --lowercase --escape-percentage --filenamesMap ./i18n-map.json
```

__example i18n-map.json__

```json
{
  "zh-CN": ["zh-cn", "zh-hans"],
  "zh-TW": ["zh-tw", "zh-hant"]
}
```
___

## License

[Licensed under MIT license](/LICENSE).
npm package: @mojang/t-component
Description: Internationalization library
Author: Mojang
Latest version: 4.0.2

# t-component

This package contains `<T/>` component that allows you to translate strings in React using [Jed](https://github.com/messageformat/Jed).

## Contributing

We are not accepting external contributions at this point in time.

## Install

To install this packages run:

```console
$ npm i @mojang/t-component
```

or

```console
$ yarn add @mojang/t-component
```

## Usage

### TranslationProvider

```tsx
import * as React from "react";
import * as ReactDOM from "react-dom";

import { TranslationProvider } from "@mojang/t-component";
import { App } from "./App";

const fetchMessages = async (path: string) => {
  return (await fetch(path)).json();
};

fetchMessages("your/translation/path").then(messages => {
  ReactDOM.render(
    <TranslationProvider translation={messages}>
      <App />
    </TranslationProvider>,
    document.getElementById("React")
  );
});
```

### T and useTranslation

```tsx
import * as React from "react";

import { T } from "@mojang/t-component";
import { App } from "./App";

export const App = () => {
  const { t } = useTranslation();
  return (
    <div>
      <p><T>This text will be translated.</T></p>
      <p>
        <T
          placeholders={[
            "https://link",
          ]}
          isHTML
        >
          {`This text <a href='%1$s'>includes a link</a> to that will also be translated`}
        </T>
      </p>
      <p>
        {t("Texts can also be translated with the t function")}
      </p>
    <div/>
  )
}

```

## Testing

To run tests, simply run the following command from the root:

```console
$ npm test
```

or

```console
$ yarn test
```

## License

[Licensed under MIT license](/LICENSE).
npm package: @mojiee/utils
Description: Utility function
Author: Mojie
Latest version: 1.0.0

# @mojiee/utils

整理的一些常用的 utils 工具函数

- ES 模块
- 支持数摇

## 文档

[文档地址](https://github.com/mojiefong/utils/blob/master/docs/globals.md)

## 用法

### 安装

```shell
pnpm add @mojiee/utils
```

### 使用

```javascript
import { toArray } from '@mojiee/utils'

toArray(123)
```
npm package: @mojir/pretty-pi
Description: A library for converting numbers to their pretty symbolic mathematical representations
Author: Albert Mojir
Latest version: 0.0.12

# PrettyPi

A TypeScript library for converting numbers to their symbolic mathematical representations.

## Features

- Identifies common mathematical constants (π, e, φ, etc.)
- Recognizes and formats square roots, cube roots, and other radicals
- Handles fractions with appropriate simplification
- Converts decimal approximations of trigonometric values to their exact forms
- Performs algebraic simplifications (e.g., 12·cos(π/6) → 6·√3)
- Uses a flexible expression tree for robust representation

## Installation

```bash
npm install pretty-pi
```

## Usage

```typescript
import { prettyPi } from "pretty-pi";

console.log(prettyPi(Math.PI)); // "π"
console.log(prettyPi(Math.E)); // "e"
console.log(prettyPi(0.5)); // "1/2"
console.log(prettyPi(Math.sqrt(2))); // "√2"
console.log(prettyPi(2 * Math.PI)); // "2·π"
console.log(prettyPi(Math.PI / 2)); // "π/2"
console.log(prettyPi(Math.sin(Math.PI / 4))); // "√2/2"
console.log(prettyPi(Math.PI ** 2)); // "π²"
console.log(prettyPi(Math.E * Math.PI)); // "e·π"
console.log(prettyPi(12 * Math.cos(Math.PI / 6))); // "6·√3"
```

## How It Works

The library uses an expression tree representation to model mathematical expressions, which enables sophisticated simplification logic and consistent formatting. The main components include:

- **Expression Nodes**: A hierarchy of node types representing different mathematical constructs (numbers, constants, operations)
- **Parser**: Converts numeric values to expression trees
- **Simplification**: Applies mathematical rules to produce the cleanest representation possible

## Supported Representations

- Basic constants: π, e, φ (golden ratio)
- Fractions: 1/2, 3/4, etc.
- Powers: π², e³
- Square roots: √2, √3, etc.
- Cube roots: ∛2, ∛3, etc.
- Combinations: 2·π, π/4, π+1, etc.
- Trigonometric values: sin(π/4) → √2/2, cos(π/3) → 1/2, etc.

## Development

```bash
# Install dependencies
npm install

# Run tests
npm test

# Run tests in watch mode
npm run test:watch

# Build the library
npm run build
```

## License

MIT
npm package: @mojis/adapters
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.4.3

# @mojis/adapters

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A collection of adapters to interact with different Unicode data files.

## Installation

```bash
npm install @mojis/adapters
```

> [!NOTE]
> Documentation is available [here](https://docs.mojis.dev/adapters)

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/adapters?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/adapters
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/adapters?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/adapters
npm package: @mojis/cli
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.4.2

# @mojis/cli

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A CLI for Mojis.

## Installation

```bash
npm install -g @mojis/cli
```

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/cli?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/cli
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/cli?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/cli
npm package: @mojis/internal-utils
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.2.0

# @mojis/internal-utils

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

Internal Utilities for working with Mojis.

## Installation

```bash
npm install @mojis/internal-utils
```

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/internal-utils?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/internal-utils
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/internal-utils?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/internal-utils
npm package: @mojis/json-schemas
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.1.0

# @mojis/json-schemas

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

JSON Schemas for for describing the emoji data outputted by the Mojis CLI.

## Installation

```bash
npm install @mojis/json-schemas
```

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/json-schemas?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/json-schemas
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/json-schemas?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/json-schemas
npm package: @mojis/loomicode
Description: A loom for unicode data files
Author: Lucas Nørgård
Latest version: 0.2.0-beta.7

# @mojis/loomicode

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A loom for unicode data files

## 📦 Installation

```bash
npm install @mojis/loomicode
```

## Usage

```ts
import { sequences } from "@mojis/loomicode";

const result = sequences({
  separator: ";",
  commentPrefix: "#",
  version: "1.0",
  input: [
    {
      codePoints: ["1F600", "1F601"],
      type: "emoji",
      description: "smiling face",
      comment: "happy expression"
    }
  ],
});

console.log(result);
```

## 📄 License

Published under [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@mojis/loomicode?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/loomicode
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/loomicode?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/loomicode
npm package: @mojis/moji-compare
Description: Compare Emoji & Unicode versions
Author: Lucas Nørgård
Latest version: 0.5.0

# @mojis/moji-compare

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

Compare Emoji & Unicode versions

> [!NOTE]
> This is based on code from [`omichelsen/compare-versions`](https://github.com/omichelsen/compare-versions), but changed to work better with emoji and unicode versions.

## 📦 Installation

```bash
npm install @mojis/moji-compare
```

## Usage

```ts
import { compare } from "@mojis/moji-compare";

compare("10.1.8", "10.0.4", ">"); // true
compare("10.0.1", "10.0.1", "="); // true
compare("10.1.1", "10.2.2", "<"); // true
compare("10.1.1", "10.2.2", "<="); // true
compare("10.1.1", "10.2.2", ">="); // false
```

## 📄 License

Published under [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@mojis/moji-compare?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/moji-compare
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/moji-compare?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/moji-compare
npm package: @mojis/parsers
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.1.2

# @mojis/parsers

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A collection of parsers to parse different Unicode data files.

## Installation

```bash
npm install @mojis/parsers
```

> [!NOTE]
> Documentation is available [here](https://docs.mojis.dev/parsers)

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/parsers?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/parsers
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/parsers?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/parsers
npm package: @mojis/schemas
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.1.0

# @mojis/schemas

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

Internal Schemas used by Mojis, created using ArkType 

## Installation

```bash
npm install @mojis/schemas
```

> [!NOTE]
> Documentation is available [here](https://docs.mojis.dev/schemas)

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/schemas?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/schemas
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/schemas?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/schemas
npm package: @mojis/skin-tone
Description: utilities to work with emoji skin tones
Author: Lucas Nørgård
Latest version: 0.3.0

# @mojis/skin-tone

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

utilities to work with emoji skin tones

## 📦 Installation

```bash
npm install @mojis/skin-tone
```

## 🚀 Usage

```ts
import { getSkinTone, hasSkinTone, setSkinTone, setSkinTones } from "@mojis/skin-tone";

console.log(setSkinTone("👍", "dark")); // -> 👍🏿
console.log(setSkinTone("👍", "light")); // -> 👍🏻
console.log(setSkinTone("👍🏻", "none")); // -> 👍

console.log(setSkinTones("👩‍❤️‍👨", ["light", "dark"])); // -> 👩🏻‍❤‍👨🏿

console.log(getSkinTone("👍🏿")); // -> dark
console.log(getSkinTone("👍🏻")); // -> light
console.log(getSkinTone("👍")); // -> none
console.log(getSkinTone("👩🏼‍❤️‍👨🏿")); // -> ["medium-light", "dark"]

console.log(hasSkinTone("👍🏿")); // -> dark
console.log(hasSkinTone("👍🏻")); // -> light
console.log(hasSkinTone("👍")); // -> none
```

## 📄 License

Published under [MIT License](./LICENSE).

<!-- Badges -->

[npm-version-src]: https://img.shields.io/npm/v/@mojis/skin-tone?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/skin-tone
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/skin-tone?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/skin-tone
npm package: @mojis/versions
Description: [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href]
Author: Lucas Nørgård
Latest version: 0.1.2

# @mojis/versions

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]

A collection of version utilities that is used by [mojis](https://mojis.dev).

## Installation

```bash
npm install @mojis/versions
```

> [!NOTE]
> Documentation is available [here](https://docs.mojis.dev/versions)

## 📄 License

Published under [MIT License](./LICENSE).

[npm-version-src]: https://img.shields.io/npm/v/@mojis/versions?style=flat&colorA=18181B&colorB=4169E1
[npm-version-href]: https://npmjs.com/package/@mojis/versions
[npm-downloads-src]: https://img.shields.io/npm/dm/@mojis/versions?style=flat&colorA=18181B&colorB=4169E1
[npm-downloads-href]: https://npmjs.com/package/@mojis/versions
npm package: @mojito-inc/loyalty-sdk
Description: Core SDK for Mojito's Loyalty Platform
Author: Mojito Inc
Latest version: 1.0.1

# Mojito Loyalty Core SDK

Welcome to the **Mojito Loyalty Platform SDK** — your all-in-one developer toolkit to integrate powerful loyalty mechanics directly into your Web App and Node.js API.

This SDK is your gateway to building engaging user experiences with missions, rewards, and real-time point systems — all while seamlessly interacting with Mojito’s platform APIs.

- 🔗 https://getmojito.com/loyalty
- 📚 Docs: https://loyaltydocs.getmojito.com/
- 📧 Support: dev-support@mojito.xyz


---

## ✨ Features

- 🔐 **User authentication**
- 🏆 **Retrieve leaderboard data**
- 🎯 **Access missions and rewards**
- 🧾 **Claim missions to earn points**
- 🎁 **Redeem and distribute rewards**

---

## 🔑 Getting Access

To use the SDK, generate your **API Key** by logging into the [Mojito Admin Portal](https://getmojito.com/loyalty).  
Go to the API section and generate your api key — you'll need it for all SDK calls.

---

## 📦 Installation

Install via **npm**:
```sh
npm install @mojito-inc/loyalty
```

Or via **yarn**:
```sh
yarn add @mojito-inc/loyalty
```

---

## 🚀 Usage

### 🔐 Authentication

**Set API Key**
```js
const sdk = new LoyaltyClient('prod');
sdk.auth.setApiKey('your-api-key-here');
```

**Fetch the sign Message for Web3 Wallet**
```js
const sdk = new LoyaltyClient('prod');
sdk.auth.fetchSignMessage('wallet-address', sdk.auth);
```

**Generate JWT from Web3 Wallet**
```js
const sdk = new LoyaltyClient('prod');
sdk.auth.generateJWT('wallet-address', 'signature', 'chain', 'message', sdk.auth);
```

**Use Existing JWT Token**
```js
const sdk = new LoyaltyClient('prod');
sdk.auth.setJWT('your-jwt-token');
```

---

### 🧾 Claims Management

**Initiate a Claim**
```js
let response = await sdk.claim.initiateClaim('mission-id', 'user-unique-address', sdk.auth);
```

**Fetch Claim Status**
```js
let response = await sdk.admin.getClaimStatus('tenant-slug', 'mission-id', 'user-unique-address', 'claim-id', sdk.auth);
```

---

### 🎁 Reward Redemption

**Initiate a Redeem**
```js
let response = await sdk.redeemption.initiateReward('reward-id', 'user-unique-address', 'wallet-address', sdk.auth);
```

---

### 📌 Missions and Rewards

**Fetch Mission by ID**
```js
let response = await sdk.admin.getMissions('mission-id', sdk.auth);
```

**Fetch Reward by ID**
```js
let response = await sdk.admin.getRewards('reward-id', sdk.auth);
```

---

## 📞 Contact & Support

- 📚 Docs: [https://loyaltydocs.getmojito.com/](https://loyaltydocs.getmojito.com/)
- 📧 Email: dev-support@mojito.xyz