open-index/open-npm huggingface dataset:
npm package: @kanalabs/aptos-smart-wallet
Description: Typescript SDK to interact with the Aptos smart wallet
Author: 0xAnto
Latest version: 0.0.3

# aptos-smart-wallet-sdk

> Typescript SDK to interact with the Aptos Smart Wallet

## Installation

`npm i @kanalabs/aptos-smart-wallet`

## Supported Networks

1. Aptos Testnet
2. Aptos Mainnet
npm package: @kanamone/edge-id2
Description: ## dist/define.js ```js function defineID(a) {   const o = [];   for (let r = 0;r < a.format.length; r++) {     const e = a.format[r], t = e.characters.split(""), i = e.repeats || 1;     for (let n = 0;n < i; n++)       o.push(t);   }   const l = a.format
Author: AOKI Yuto
Latest version: 0.0.3

# edge-id2

## dist/define.js
```js
function defineID(a) {
  const o = [];
  for (let r = 0;r < a.format.length; r++) {
    const e = a.format[r], t = e.characters.split(""), i = e.repeats || 1;
    for (let n = 0;n < i; n++)
      o.push(t);
  }
  const l = a.format.map((r) => {
    return r.characters.length ** (r.repeats || 1);
  }).reduce((r, e) => r * e, 1), s = [];
  for (let r = 0;r < o.length; r++)
    s.push(o.slice(r).reduce((e, t) => e * t.length, 1));
  return { n: l, stringify: (r) => {
    if (r < 0)
      throw new Error("negative number is not acceptable.");
    if (l < r + 1)
      throw new Error(`number of ids exceeded. number of available ids = ${l}`);
    let e = "";
    for (let t = 0;t < s.length; t++) {
      const i = s[t], n = Math.floor(r % i / (s[t + 1] || 1));
      e += o[t][n];
    }
    return e;
  }, parse: (r) => {
    if (r.length !== o.length)
      throw new Error("invalid id length.");
    let e;
    const t = r.split("").map((n, c) => {
      const f = o[c], h = f.indexOf(n);
      if (h < 0)
        e = new Error(`invalid id. '${n}' (index = ${c}) is not acceptable in [${f.join(", ")}].`);
      return h * (s[c + 1] || 1);
    });
    if (e)
      throw e;
    let i = 0;
    for (let n = 0;n < t.length; n++)
      i += t[n];
    return i;
  } };
}
```

## dist/format.js
```js
function createFormat(n, c, o) {
  const t = n.split("").map((r) => {
    return {
      characters: c[r] || r
    };
  });
  if (!o)
    return t;
  return t.reduceRight((r, e) => {
    const a = r[0];
    if (r.length > 0 && a.characters === e.characters)
      return r[0] = Object.assign({}, e, {
        repeats: (e.repeats || 1) + (a.repeats || 1)
      }), r;
    return r.unshift(e), r;
  }, []);
}
```
npm package: @kanamone/id2
Description: the ID converter that can convert between IDs with different orders and character types and unique numeric sequences.
Author: AOKI Yuto
Latest version: 1.0.0

# id2

the ID converter that can convert between IDs with different orders and character types and unique numeric sequences.

# install

```bash
npm install @kanamone/id2
```

or

```bash
yarn add @kanamone/id2
```

# example

## Human Readable ID

### Instantiate

```ts
const id2 = new ID2.Converter({
  format: ID2.Converter.format('XXXX-00000', {
    X: 'ACFHJKPRSTUVWXYZ',
    0: '234567'
  })
})
```

### Convert number to string

```ts
id2.stringify(0)
// => 'AAAA-22222'
id2.stringify(1)
// => 'AAAA-22223'
id2.stringify(1234567)
// => 'AATY-65553'
id2.stringify(id2.numberOfAvailableIDs - BigInt(1))
// => 'ZZZZ-77777'
```

### Convert string to number

```ts
id2.parse('AAAA-22222')
// => 0n
id2.parse('AAAA-22223')
// => 1n
id2.parse('AATY-65553')
// => 1234567n
id2.parse('ZZZZ-77777')
// => 509607935n
```

## UUID v4

### Instantiate

```ts
import ID2 from '@kanamone/id2'
const id2 = new ID2.Converter({
  format: ID2.Converter.format('RRRRRRRR-RRRR-4RRR-rRRR-RRRRRRRRRRRR', {
    R: '0123456789abcdef',
    r: '89ab'
  })
})
```

### Convert number to string

```ts
id2.stringify(0)
// => '00000000-0000-4000-8000-000000000000'
id2.stringify(BigInt('3881947731413173145134900932847109277'))
// => 'bae8b334-a84b-4d25-ba49-3b943cfc849d'
id2.stringify(id2.numberOfAvailableIDs - BigInt(1))
// => 'ffffffff-ffff-4fff-bfff-ffffffffffff'
```

### Convert string to number

```ts
id2.parse('00000000-0000-4000-8000-000000000000')
// => 0n
id2.parse(BigInt('3881947731413173145134900932847109277'))
// => 3881947731413173145134900932847109277n
id2.parse('ffffffff-ffff-4fff-bfff-ffffffffffff')
// => 5316911983139663491615228241121378303n
```

# classes

## class Converter

#### new Converter (options: Options)

##### `Options`

###### `format`

for ID pattern `[A-Z]{3}-[0-9]{4}`

```ts
new ID2.Converter({
  format: [
    {
      characters: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
      repeats: 3
    },
    {
      characters: '-',
    },
    {
      characters: '0123456789',
      repeats: 4
    }
  ]
})
```

Or use the more manageable pattern helper.

```ts
// Same format as above.
new ID2.Converter({
  format: ID2.Converter.format('XXX-0000', {
    X: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
    0: '0123456789'
  })
}
```

#### stringify (n: number | bigint): string

Converts the given number to a string.

#### parse (id: string): bigint

Converts the given id to a number.

#### lengthOfID: number

ID length specified by format.

#### numberOfAvailableIDs: number

Maximum number of IDs specified by format.

# license

MIT
npm package: @kanamone/scrambler
Description: Converts an integer to another integer that is unpredictable and reversible.
Author: AOKI Yuto
Latest version: 1.0.6

# @kanamone/scrambler

Converts an integer to another integer that is unpredictable and reversible.

# install

## use npm
```bash
npm install @kanaomone/scrambler
```

## use yarn

```bash
yarn add @kanamone/scrambler
```

## use pnpm

```bash
pnpm add @kanamone/scrambler
```

# how to use

## find two numbers

1. Decide the number of digits (ex. 4)
2. Decide one **first odd number (n1)** that fits in the number of digits (ex. 1101)
3. Formulate

`1101x - (10^4)y = 1`

4. Enter the formula into [Wolfram|Alpha](https://www.wolframalpha.com/) and get an integer solution

`x = 10000 n + 8901, y = 1101 n + 980, n element Z`

5. Get the **second odd number (n2)**

`8901`

## example

```ts
import { createScrambler } from '@kanamone/scrambler'

const scrambler = createScrambler({
  digits: 4,
  n1: BigInt(1101),
  n2: BigInt(8901),
  seed: 123456789,
  stages: 10
})

const from = BigInt(1)
const to = scrambler.scramble(from)
const restored = scrambler.restore(to)

console.log({
  from,
  to,
  restored
})
```

### Output

```
{
  from: 1n,
  to: 4055n,
  restored: 1n
}
```

## methods

### createScrambler(options): Scrambler

Return the scrambler.

#### Options

##### digits: number

number of digits in space.

##### n1: number, n2: number

Odd number pair that satisfies `(n1 * n2) % (10 ** digits) === 1`.

##### seed: number

Seed value for swap table creation.

##### stages: number

Number of swap/slide stages.

# license

MIT
npm package: @kanamone/vite-plugin-dynamic-import-with-import-map
Description: Import some module via importmap
Author: himanoa
Latest version: 0.1.2

# @kanamone/vite-plugin-dynamic-import-with-import-map

[![npm version](https://badge.fury.io/js/@kanamone%2Fvite-plugin-dynamic-import-with-import-map.svg)](https://badge.fury.io/js/@kanamone%2Fvite-plugin-dynamic-import-with-import-map)
[![test](https://github.com/kanamone/vite-plugin-dynamic-import-with-import-map/actions/workflows/test.yml/badge.svg)](https://github.com/kanamone/vite-plugin-dynamic-import-with-import-map/actions/workflows/test.yml)

Import some modules via [importmap](https://developer.mozilla.org//docs/Web/HTML/Element/script/type/importmap)

## Features

1. ✅ Auto embed importmap in index.html
1. ✅ Auto generate external modules bundle by esbuild
    1. ✅ Minify
    1. ✅ Inline sourcemap

## Installation 

```sh
npm install @kanamone/vite-plugin-dynamic-import-with-import-map
```

## Usage

The following example makes split `react` bundle

```ts
// vite.config.ts

import { defineConfig } from 'vite'
import { dynamicImportWithImportMap } from '@kanamone/vite-plugin-dynamic-import-with-import-map'

export default defineConfig({
  plugins: [dynamicImportWithImportMap(['react'])],
})
```

## Caveats

Module dependency resolution doesn't work. Because vite is not execute rollup build phase when serve mode.
npm package: @kananon/thai-datepicker
Description: Thai Buddhist Calendar DatePicker for Vue 3
Author: Kananon
Latest version: 1.0.4

# Thai DatePicker

Vue 3 DatePicker component with Thai Buddhist calendar support.
# Image Example
![Image](https://github.com/talqwerty/Tal-Picker/blob/main/src/assets/example.png)

## Features

- 🗓️ Thai Buddhist calendar (พ.ศ.)
- 🎨 Beautiful UI with yellow/gold theme
- 📱 Mobile responsive
- ♿ Accessible with ARIA labels
- 🔧 Customizable props
- 💪 TypeScript support
- 🌐 Returns Gregorian dates (ค.ศ.)

## Installation

```bash
npm i @kananon/thai-datepicker
```

## Usage

### ES Module (Recommended)

```vue
<script setup>
import { ThaiDatePicker } from '@kananon/thai-datepicker'
import '@kananon/thai-datepicker/dist/thai-datepicker.css'
import { ref } from 'vue'

const selectedDate = ref('')
</script>

<template>
  <ThaiDatePicker 
    v-model="selectedDate" 
    placeholder="เลือกวันที่"
  />
  <input type="hidden" v-model="selectedDate"> <!-- ค่าที่ส่งไปยัง server -->
</template>
```

### CDN Usage

```html
<!DOCTYPE html>
<html>
<head>
  <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
  <script src="https://unpkg.com/thai-datepicker@latest/dist/thai-datepicker.iife.js"></script>
  <link rel="stylesheet" href="https://unpkg.com/thai-datepicker@latest/dist/thai-datepicker.css">
</head>
<body>
  <div id="app">
    <thai-date-picker v-model="date"></thai-date-picker>
    <p>Selected: {{ date }}</p>
  </div>

  <script>
    const { createApp, ref } = Vue
    
    createApp({
      setup() {
        const date = ref('')
        return { date }
      }
    }).use(ThaiDatePicker).mount('#app')
  </script>
</body>
</html>
```

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `modelValue` | `String` | `''` | Selected date value (v-model) |
| `placeholder` | `String` | `'เลือกวันที่'` | Input placeholder text |
| `minYear` | `Number` | `currentYear - 50` | Minimum selectable year |
| `maxYear` | `Number` | `currentYear + 10` | Maximum selectable year |

## Events

| Event | Payload | Description |
|-------|---------|-------------|
| `update:modelValue` | `String` | Emitted when date is selected |
| `change` | `String` | Emitted when date changes |

## Date Format

- **Display**: Thai Buddhist year format (`DD/MM/YYYY` in พ.ศ.)
- **Output**: Gregorian year format (`DD/MM/YYYY` in ค.ศ.)

Example:
- User sees: `15/08/2568`
- v-model gets: `15/08/2025`

## Browser Support

- Chrome/Edge 88+
- Firefox 85+
- Safari 14+

## Development

```bash
# Install dependencies
npm install

# Development server
npm run dev

# Build library
npm run build

# Preview build
npm run preview
```

## License

MIT

## Contributing

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
npm package: @kanaqsasak/card-gen
Description: CLI tool to generate Luhn-valid test payment card numbers for Visa, Mastercard, Amex, Discover, UnionPay, JCB, Diners Club, Maestro, Mir, RuPay and more
Latest version: 1.0.0

# card-gen

Generate Luhn-valid test payment card numbers from the command line.

## Install

```sh
npm install -g card-gen
```

## Usage

```
card-gen [options]

Options:
  -n, --count <number>   Number of cards to generate (default: 5)
  -t, --type <network>   Card network (default: "all")
  -b, --bin <prefix>     Custom BIN prefix (overrides --type)
  --cvv                  Include CVV/CVC in output
  --expiry-from <MM/YY>  Earliest expiry date (default: current month)
  --expiry-to <MM/YY>    Latest expiry date (default: 3 years from now)
  -h, --help             Display help
  -V, --version          Output version number
```

## Examples

```sh
# 5 random cards across all networks
card-gen

# 10 Visa cards with CVV
card-gen -n 10 -t visa --cvv

# 3 cards with a custom BIN prefix
card-gen -n 3 -b 453985

# Mastercard cards expiring between 01/25 and 12/27
card-gen -n 8 -t mastercard --expiry-from 01/25 --expiry-to 12/27

# JCB cards with CVV
card-gen -n 4 -t jcb --cvv
```

## Supported networks

| ID | Network |
|---|---|
| `visa` | Visa |
| `mastercard` | Mastercard |
| `amex` | Amex |
| `discover` | Discover |
| `unionpay` | UnionPay |
| `jcb` | JCB |
| `diners` | Diners Club |
| `maestro` | Maestro |
| `mir` | Mir |
| `rupay` | RuPay |
| `eftpos` | eftpos |

## Notes

- All card numbers pass the [Luhn algorithm](https://en.wikipedia.org/wiki/Luhn_algorithm) — they are structurally valid but **not real cards**.
- Card numbers are displayed without spaces for easy double-click selection and copying.
- Amex CVV is 4 digits; all others are 3 digits.
- UnionPay and Maestro cards can be 12–19 digits depending on the spec.

## License

MIT
npm package: @kanaqsasak/req-flash
Description: Unopinionated middleware for creating flash messages of all types for Express apps.
Author: Maximilian Schmitt
Latest version: 0.0.3

req-flash
=========

Unopinionated middleware for creating flash messages of all types for Express apps.

## Usage

### 1. Install req-flash:

``` javascript
npm install req-flash
```

### 2. Register the req-flash middleware after your session middleware:

``` javascript
var express      = require('express');
var cookieParser = require('cookie-parser');
var session      = require('express-session');
var flash        = require('req-flash');

var app          = express();

app.use(cookieParser());
app.use(session({ secret: '123' }));
app.use(flash());
```

**Tipp:** Use `flash({ locals: 'flash' })` to magically make all flash messages available to your views by attaching them to `res.locals['flash']` (or whatever you specifiy instead of 'flash').

### 3. Flash any amount of messages:

``` javascript
app.get('/test', function() {
	req.flash('successMessage', 'You are successfully using req-flash');
	req.flash('errorMessage', 'No errors, you\'re doing fine');

	res.redirect('/');
});

app.get('/', function() {
	res.send(req.flash());
});
```

"/test" redirects to "/" and outputs:

```
{
	"successMessage": "You are successfully using req-flash",
	"errorMessage": "No errors, you're doing fine"
}
```