open-index/open-npm huggingface dataset:
npm package: @kakilangit/base64
Description: WebAssembly bindings for Base64 Encoder/Decoder tool
Latest version: 0.2.0

# @kakilangit/base64

WebAssembly bindings for Base64 Encoder/Decoder tool.

## Overview

This package provides fast Base64 encoding and decoding functionality compiled to WebAssembly from Rust. It supports both standard Base64 and URL-safe Base64 alphabets, with optional padding.

## Installation

```bash
npm install @kakilangit/base64
```

## Usage

```javascript
import init, { encode_base64, decode_base64, Base64Alphabet } from '@kakilangit/base64';

// Initialize the WASM module
await init();

// Encode with standard alphabet and padding
const encoded = encode_base64("Hello, World!", Base64Alphabet.Standard, true);
console.log(encoded.encoded); // "SGVsbG8sIFdvcmxkIQ=="

// Encode with URL-safe alphabet (no padding)
const urlSafe = encode_base64("Hello+World=/", Base64Alphabet.UrlSafe, false);

// Decode
const decoded = decode_base64("SGVsbG8sIFdvcmxkIQ==", Base64Alphabet.Standard);
console.log(decoded.decoded); // "Hello, World!"
console.log(decoded.is_valid); // true
```

## API

### Functions

#### `encode_base64(input, alphabet, pad)`
Encodes a string to Base64.

- `input` (string): The string to encode
- `alphabet` (Base64Alphabet): The alphabet to use
- `pad` (boolean): Whether to add padding characters

Returns `EncodeResult`:
- `original`: Original input string
- `encoded`: Encoded Base64 string
- `alphabet`: Alphabet name used
- `padded`: Whether padding was added
- `byte_count`: Length of input in bytes

#### `decode_base64(input, alphabet)`
Decodes a Base64 string.

- `input` (string): The Base64 string to decode
- `alphabet` (Base64Alphabet): The alphabet to use

Returns `DecodeResult`:
- `original`: Original Base64 input
- `decoded`: Decoded string
- `is_valid`: Whether the input was valid Base64
- `byte_count`: Length of decoded output in bytes
- `alphabet`: Alphabet name detected/used

#### Convenience Functions

- `encode_base64_standard(input, pad)` - Encode using standard alphabet
- `encode_base64_url_safe(input, pad)` - Encode using URL-safe alphabet
- `decode_base64_standard(input)` - Decode using standard alphabet
- `decode_base64_url_safe(input)` - Decode using URL-safe alphabet

### Enums

#### `Base64Alphabet`
- `Standard = 0` - Standard Base64 alphabet (A-Z, a-z, 0-9, +, /)
- `UrlSafe = 1` - URL-safe Base64 alphabet (A-Z, a-z, 0-9, -, _)

## Features

- Fast Base64 encoding/decoding via WebAssembly
- Standard RFC 4648 Base64 alphabet support
- URL-safe Base64 alphabet (RFC 4648 section 5)
- Optional padding control
- Input validation with detailed error messages

## License

MIT
npm package: @kakilangit/openapi-viewer
Description: WebAssembly bindings for OpenAPI Viewer tool
Latest version: 0.1.0

# @kakilangit/openapi-viewer

WebAssembly bindings for OpenAPI Viewer tool.

## Overview

This package provides OpenAPI 3.0.x specification parsing and viewing functionality compiled to WebAssembly from Rust. It supports:

- **Parsing** - Parse OpenAPI specifications from JSON or YAML
- **Extraction** - Extract API info, endpoints, and server URLs
- **Conversion** - Convert between JSON and YAML formats

## Installation

```bash
npm install @kakilangit/openapi-viewer
```

## Usage

```javascript
import init, { 
  parse_openapi, 
  yaml_to_json, 
  json_to_yaml,
  OpenApiInfo
} from '@kakilangit/openapi-viewer';

// Initialize the WASM module
await init();

// Parse an OpenAPI specification
const spec = `
openapi: "3.0.0"
info:
  title: Pet Store API
  version: 1.0.0
paths:
  /pets:
    get:
      summary: List pets
      operationId: listPets
      responses:
        "200":
          description: Success
`;

const info = parse_openapi(spec);
console.log(info.title);       // "Pet Store API"
console.log(info.api_version); // "1.0.0"
console.log(info.paths);       // Array of endpoint info

// Convert YAML to JSON
const json = yaml_to_json(spec);
console.log(json); // Formatted JSON string

// Convert JSON to YAML
const yaml = json_to_yaml('{"key": "value"}');
console.log(yaml); // YAML string
```

## API

### Functions

#### `parse_openapi(input)`
Parses an OpenAPI 3.0.x specification from JSON or YAML string.

- `input` (string): The OpenAPI specification in JSON or YAML format

Returns `OpenApiInfo`:
- `version`: OpenAPI version (e.g., "3.0.0")
- `title`: API title
- `description`: API description (if present)
- `api_version`: API version string
- `paths`: Array of endpoint information
  - `path`: Path pattern (e.g., "/users/{id}")
  - `method`: HTTP method (GET, POST, etc.)
  - `summary`: Operation summary (if present)
  - `description`: Operation description (if present)
  - `operation_id`: Operation ID (if present)
- `servers`: Array of server URLs

#### `yaml_to_json(input)`
Converts a YAML string to formatted JSON.

- `input` (string): YAML content

Returns: `string` - Formatted JSON string

#### `json_to_yaml(input)`
Converts a JSON string to YAML.

- `input` (string): JSON content

Returns: `string` - YAML string

## Features

- Fast OpenAPI parsing via WebAssembly
- Support for OpenAPI 3.0.x specifications
- Automatic format detection (JSON/YAML)
- Bidirectional JSON/YAML conversion
- Structured endpoint extraction

## License

MIT
npm package: @kako351/react-native-gemini-nano
Description: React Native TurboModule bridge for Android ML Kit Prompt API backed by Gemini Nano.
Latest version: 0.1.0

# @kako351/react-native-gemini-nano

Android 向けの React Native TurboModule ライブラリです。ML Kit Prompt API を通して、端末上の Gemini Nano を利用します。

## Requirements

- React Native 0.84 以上
- Android New Architecture 有効
- Android API 31 以上
- Gemini Nano Prompt API 対応端末

## Install

```bash
npm install @kako351/react-native-gemini-nano
```

Android 側は autolinking を前提にしています。

## Usage

```ts
import GeminiNano, {useGeminiNano} from '@kako351/react-native-gemini-nano';

const availability = await GeminiNano.getAvailability();

if (availability.status === 'needs_download') {
  await GeminiNano.downloadModel();
}

const text = await GeminiNano.generateText('3行で要約してください');
```

Hook を使う場合:

```ts
const {
  availability,
  refreshAvailability,
  downloadModel,
  generateText,
  generateTextStream,
  streamedText,
  isStreaming,
  downloadState,
} = useGeminiNano();
```

## API

- `isAvailable(): Promise<boolean>`
- `getAvailability(): Promise<{ status; isAvailable; message; errorCode? }>`
- `downloadModel(): Promise<void>`
- `generateText(prompt: string): Promise<string>`
- `generateTextStream(prompt: string): void`

`getAvailability().status` は次を返します。

- `available`
- `needs_download`
- `downloading`
- `needs_system_update`
- `busy`
- `unavailable`
- `unknown`

## Notes

- 実行基盤は ML Kit Prompt API ですが、実際のオンデバイス推論は AICore / Gemini Nano により行われます。
- 端末が対応機種でも、モデル未配信やダウンロード未完了の間は `available` にならないことがあります。
- サンプルアプリは `example/` に入っています。
npm package: @kakuilan/js-helper
Description: K`s javascript helper/library/utils
Author: kakuilan
Latest version: 1.0.3

# js-helper

k`s javascript helper/library/utils

### install

```shell
npm i @kakuilan/js-helper
#or
yarn add @kakuilan/js-helper
```

### usage

```js
import { Kencrypt, Kdatetime } from '@kakuilan/js-helper';

let s = Kdatetime.nowSecond();
let d = Kencrypt.md5('123456');
```

### other

- version 1.0.0