open-index/open-npm huggingface dataset:
npm package: @masa-dev/unicode-escapes
Description: This is a library for Unicode character class escape.
Latest version: 0.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Unicode escapes

This is a library for Unicode character class escape.

## Install

```
npm i @masa-dev/unicode-escapes
```

## Samples

```typescript
// Just a utility for samples
function output(str: string, regStr: string) {
  // Create a RegExp with the Unicode flag
  const reg = new RegExp(regStr, 'gu');
  // Match the string
  const result = str.match(reg);
  // Output the result
  console.log(result);
}

// Use General Categories
output('aA', GC.LowercaseLetter); // ['a']
output('aA', `${GC.LowercaseLetter}|${GC.UppercaseLetter}`); // ['a', 'A']

// Use Script Properties
output('あa亜', Script.Hiragana); // ['あ']
output('あa亜', `${Script.Hiragana}|${Script.Han}`); // ['あ', '亜']

// Use Binary Unicode Properties
output('a😂', BU.Emoji); // [ '😂' ]
```
npm package: @masa-dev/web-file-base64
Description: Web File Base64
Latest version: 0.1.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# web-file-base64

A lightweight utility for converting between File and Base64 in browser environments.

## Features

- 🪶 Lightweight (Zero dependencies)
- 📦 Simple API
- 💪 Full TypeScript support
- 🌐 Works in all modern browsers

## Installation

```bash
npm install @masa-dev/web-file-base64
# or
yarn add @masa-dev/web-file-base64
# or
pnpm add @masa-dev/web-file-base64
```

## Usage

```typescript
import { fileToBase64, base64ToFile } from '@masa-dev/web-file-base64';

// Convert File to Base64
const file = new File(['Hello, World!'], 'test.txt', { type: 'text/plain' });
const base64 = await fileToBase64(file);
// => "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="

// Convert Base64 to File
const newFile = base64ToFile(base64, 'converted.txt');
// => File object

// Get MIME type from Base64
const mimeType = base64ToMimeType(base64);
// => "text/plain"

// Get file extension from Base64
const extension = base64ToFileExtension(base64);
// => "plain"
```

## License

MIT