open-index/open-npm huggingface dataset:
npm package: @mizdra/eco-backstopjs-runner
Description: Eco-friendly Backstop.js runner.
Author: mizdra
Latest version: 0.0.6

# @mizdra/eco-backstopjs-runner

実行時間が最小になるよう設計された Backstop.js カスタムランナーです。

## Target users

- `referenceUrl` を使い、異なる環境同士のビジュアルリグレッションテストを実行しているユーザー

## How it works

このカスタムランナーは以下のように動作します。

1. 全シナリオに対して、`backstop test` を実行する
2. ステップ 1 で failed になったシナリオに対して、 `backstop reference` でリファレンスを再作成
3. ステップ 1 で failed になったシナリオに対して、再度 `backstop test` を実行する
4. HTML レポートを作成
   - ステップ 1 で passed なシナリオは passed としてレポートに記録されます
   - ステップ 1 では failed、ステップ 3 では passed なシナリオは passed としてレポートに記録されます
   - ステップ 1 では failed、ステップ 3 でも failed なシナリオは failed としてレポートに記録されます
5. 実行を終了する
   - レポートに failed なシナリオが 1 つでも記録されていれば、exit code 1 で、1 つもなければ exit code 0 で終了します

この挙動により、以下のようなメリットが得られます。

- 新規にシナリオを追加する際に、手動での reference の生成が不要になります
  - まだ reference のないシナリオがあっても、一度 reference を作成した上で test が実行されるためです
  - 自動生成された reference をリポジトリに commit するような CI を組めば、手動で reference を作成・commit する手間を省けます
- reference が古くなっている場合は、自動で reference 更新してから test を実行できます
  - reference が時間経過で変化するプロジェクトで有用です

## Install

```console
$ npm install -D @mizdra/eco-backstopjs-runner backstopjs
$ yarn add -D @mizdra/eco-backstopjs-runner backstopjs
```

## Usage

CLI インターフェイスは本家 Backstop.js と可能な限りの互換性を持たせています。ただし、カスタムランナーの内部で `reference`/`test` コマンドの制御をしているため、本家 Backstop.js にはあったサブコマンド (`test`/`reference`/`approve`/...) がありません。

```console
$ # basic
$ eco-backstop --config backstop.json

$ # JavaScript の設定ファイルを使う
$ eco-backstop --config backstop.config.js

$ # docker 経由で backstop を実行
$ eco-backstop --config backstop.json --docker

$ 特定のシナリオのみ実行
$ eco-backstop --config backstop.json --filter <scenarioLabelRegex>
```

また、設定ファイルにはいくつか必須要件があります。

- `id` が必須です
- `paths.bitmaps_reference` が必須です
- `paths.bitmaps_test` が必須です
- `paths.html_report` が必須です
- `paths.json_report` が必須です
- `report` が必須です
  - `"browser"`, `"json"` が含まれている必要があります

```json
// サンプル
{
  "id": "visual regression test",
  "paths": {
    "bitmaps_reference": "backstop_data/bitmaps_reference",
    "bitmaps_test": "backstop_data/bitmaps_test",
    "html_report": "backstop_data/html_report",
    "json_report": "backstop_data/json_report"
  },
  "report": ["browser", "json"]
  // ...
}
```
npm package: @mizdra/eslint-config-mizdra
Description: ESLint config for @mizdra
Author: mizdra
Latest version: 7.0.0

# eslint-config-mizdra

ESLint config for @mizdra

## インストール

```bash
npm i -D @mizdra/eslint-config-mizdra eslint
```

## 使い方

```javascript
import { defineConfig, globalIgnores } from 'eslint/config';
import mizdra from '@mizdra/eslint-config-mizdra';

export default defineConfig([
  globalIgnores(['**/dist']),
  ...mizdra.baseConfigs,
  ...mizdra.typescriptConfigs,
  ...mizdra.nodeConfigs,
  ...mizdra.reactConfigs,
  {
    rules: {
      // Write your favorite rules
    },
  },
  mizdra.prettierConfig,
]);
```

## 組み込みの 3rd-party packages について

利便性のため、`eslint-config-mizdra` は以下の ESLint Plugins を [`dependencies`](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies) としてインストールします。そのため、`eslint-config-mizdra` を利用するプロジェクトの `devDependencies` にこれらを追加する必要はありません。

- [`@typescript-eslint/eslint-plugin`](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin)
- [`eslint-plugin-n`](https://www.npmjs.com/package/eslint-plugin-n)
- [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react)
- [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [`eslint-plugin-simple-import-sort`](https://www.npmjs.com/package/eslint-plugin-simple-import-sort)

その他にもいくつかのパッケージを `dependencies` としてインストールしています。詳しくは [package.json](./package.json) の `dependencies` フィールドを参照してください。

インストールされるバージョンは、`eslint-config-mizdra` をインストールした時点で最も最新のものです。一度インストールされると、package-lock.json などによりバージョンが固定されます。最新のバージョンにアップデートする方法や、好きなバージョンに固定する方法は、「[よくある質問](#よくある質問)」を参照してください。

## 利用可能な config

### `baseConfigs`

基本的な rule をまとめた config です。

### `typescriptConfigs`

TypeScript 向けの config です。

### `nodeConfigs`

Node.js で実行されるコード向けの config です。利用するには、[`eslint-plugin-n` のドキュメントに従って Node.js のバージョンを指定しておく](https://github.com/eslint-community/eslint-plugin-n#configured-nodejs-version-range)必要があります。

```json
// package.json
{
  "name": "your-module",
  "version": "1.0.0",
  "engines": {
    "node": ">=16.0.0" // required
  }
}
```

### `reactConfigs`

React を使っているコード向けの config です。

### `prettierConfig`

Prettier を使っているコード向けの config です。必ず config list の最後に設定してください。

## よくある質問

### 組み込みの 3rd-party packages をアップデートするには?

一度 `eslint-config-mizdra` をアンインストールしてから再度インストールしてください。組み込みの 3rd-party packages が最新のバージョンに切り替わります。

```bash
npm un @mizdra/eslint-config-mizdra
npm i -D @mizdra/eslint-config-mizdra
```

### 組み込みの 3rd-party packages を好きなバージョンに固定するには?

npm と pnpm では、`package.json` の `overrides` フィールドを使って、組み込みの 3rd-party packages を好きなバージョンにできます。yarn では、`package.json` の `resolutions` フィールドを使って、組み込みの 3rd-party packages のバージョンを固定できます。

- https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides
- https://yarnpkg.com/configuration/manifest/#resolutions
- https://pnpm.io/ja/package_json#pnpmoverrides

```json
// package.json
{
  "overrides": {
    "typescript-eslint": "^8.5.0"
  }
}
```
npm package: @mizdra/eslint-plugin-layout-shift
Description: ESLint plugin to force responsive media elements to set the width/height attributes
Author: mizdra
Latest version: 1.0.1

# @mizdra/eslint-plugin-layout-shift

ESLint plugin to force responsive media elements to set the width/height attributes

## Motivation

The Web has been using `<img>` tags to load images since ancient times. However, the `<img>` tag does not have any attribute to embed the aspect ratio. As a result, the size of the responsive img element cannot be determined until the browser fetches the image from the network and finishes loading, and there is a problem that [Layout Shift](https://web.dev/cls) occurs on the page.

To solve this problem, [the idea of computing the layout using the width and height attributes](https://developer.mozilla.org/en-US/docs/Web/Media/images/aspect_ratio_mapping) has been proposed and is starting to be implemented in browsers.

- Chrome: https://www.chromestatus.com/feature/5695266130755584
- Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
- Safari: https://trac.webkit.org/changeset/254669/webkit

This plugin forbids media element without an explicit size attributes to prevent Layout Shift from occurring.

## Installation

You'll first need to install [ESLint](http://eslint.org):

```
$ npm i eslint --save-dev
$ yarn add eslint --save-dev
```

Next, install `@mizdra/eslint-plugin-layout-shift`:

```
$ npm install @mizdra/eslint-plugin-layout-shift --save-dev
$ yarn add @mizdra/eslint-plugin-layout-shift --save-dev
```

## Usage

Add `@mizdra/layout-shift` to the plugins section of your `.eslintrc` configuration file.

```json
{
  "plugins": ["@mizdra/layout-shift"]
}
```

Then configure the rules you want to use under the rules section.

```json
{
  "rules": {
    "@mizdra/layout-shift/require-size-attributes": 2
  }
}
```

## Supported Rules

- [@mizdra/layout-shift/require-size-attributes](https://github.com/mizdra/eslint-plugin-layout-shift/blob/master/docs/rules/require-size-attributes.md): Forbid media element without an explicit size attributes

## Release (for contributor)

```console
$ # Wait for passing CI...
$ git switch master
$ git pull
$ yarn version
$ npm publish
$ git push --follow-tags
```
npm package: @mizdra/eslint-plugin-mizdra
Description: ESLint rules for me.
Author: mizdra
Latest version: 0.0.3

# eslint-plugin-mizdra
ESLint rules for me.


## インストール
```bash
$ npm install @mizdra/eslint-plugin-mizdra
```


## 設定
```json
// .eslintrc
{
    "plugins": [
        "@mizdra/eslint-plugin-mizdra"
    ],
    "rules": {
        "mizdra/prefer-static-import": 1
    }
}
```


## ルール一覧
- **mizdra/prefer-static-import**: require関数の引数に変数が含まれていた場合に警告します


## ビルド
```bash
$ git clone https://github.com/mizdra/eslint-plugin-mizdra.git
$ cd eslint-plugin-mizdra
$ npm install
# テスト
$ npm test
```


## License
MIT License
npm package: @mizdra/gen3-jpn-pokedex
Description: 日本語ポケモン図鑑クラス
Author: mizdra
Latest version: 2.2.1

# gen3-jpn-pokedex
日本語ポケモン図鑑クラスです。


# 特徴
- TypeScriptによる型補完。
- 第三世代のみ対応。

## インストール
```bash
$ npm install @mizdra/gen3-jpn-pokedex
```

```js
// ES5 import
var pokedex = require('@mizdra/gen3-jpn-pokedex');

// ES6 import
import pokedex from '@mizdra/gen3-jpn-pokedex';

let poke = pokedex.filter(poke => poke.nationalId === 1);
console.log(poke[0].name); // => 'フシギダネ'
```


## ビルド
```bash
$ git clone https://github.com/mizdra/gen3-jpn-pokedex.git
$ cd gen3-jpn-pokedex
$ npm install -g  mocha gulp dtsm
$ npm install
$ dtsm install
$ gulp
```

### テスト
```bash
$ npm test
```

# 依存モジュール
- [@mizdra/gen3-poke-data](https://github.com/mizdra/gen3-poke-data)
npm package: @mizdra/gen3-poke-data
Description: 第三世代ポケモン情報クラス
Author: mizdra
Latest version: 3.1.1

# gen3-poke-data
第三世代ポケモン情報クラス。


## 特徴
- TypeScriptによる型補完。
- 第三世代のみ対応。

## インストール
```bash
$ npm install @mizdra/gen3-poke-data
```

```js
// ES5 import
var PokeData = require('@mizdra/gen3-poke-data').PokeData;

// ES6 import
import {PokeData} from '@mizdra/gen3-poke-data';

let pokedata = new PokeData({
    "id": 1,
    "national_id": 1,
    "name": "フシギダネ",
    "form_name": null,
    "height": 7,
    "weight": 69,
    "types": [
        "くさ",
        "どく"
    ],
    "base_stats": [
        45,
        49,
        49,
        45,
        65,
        65
    ],
    "gender_threshold": 31,
    "catch_rate": 45,
    "held_items": {
        "rse": {
            "rarely": null,
            "sometimes": null,
            "always": null
        },
        "frlg": {
            "rarely": null,
            "sometimes": null,
            "always": null
        }
    },
    "abilities": ["しんりょく"]
});

console.log(pokedata.name); // => 'フシギダネ'
```


## ビルド
```bash
$ git clone https://github.com/mizdra/gen3-poke-data.git
$ cd gen3-poke-data
$ npm install -g  mocha gulp dtsm
$ npm install
$ dtsm install
$ gulp
```

### テスト
```bash
$ npm test
```
npm package: @mizdra/github-label-presets
Description: The label presets for https://github.com/azu/github-label-setup.
Author: mizdra
Latest version: 1.1.1

# @mizdra/github-label-presets

The label presets for https://github.com/azu/github-label-setup.

## Usage

```bash
GITHUB_TOKEN=$(gh auth token) npx -p @azu/github-label-setup -p @mizdra/github-label-presets github-label-setup --labels @mizdra/github-label-presets
```
npm package: @mizdra/happy-birthday
Description: Happy Birthday, mizdra 🎉
Author: mizdra
Latest version: 1.0.0

# happy-birthday

Happy Birthday, mizdra!! 🎉

## Usage

```bash
# Use npx command (bundled with npm)
$ npx @mizdra/happy-birthday
```

or

```bash
# Use npm command
$ npm i -g @mizdra/happy-birthday
$ hbd-mizdra
```
npm package: @mizdra/node-next-image-loader
Description: The Node.js Loader like next-image-loader
Author: mizdra
Latest version: 0.2.0

# @mizdra/node-next-image-loader

The Node.js Loader like next-image-loader

## Usage

```console
$ npm install @mizdra/node-next-image-loader
$ node --import @mizdra/node-next-image-loader index.js
```

```js
import burnAllGIF from "./assets/burnallgifs.png";

console.log(burnAllGIF);
// {
//   src: 'data:image/png;base64,...',
//   width: 199,
//   height: 117,
// }
```
npm package: @mizdra/oxfmt-config
Description: Oxfmt config for @mizdra
Author: mizdra
Latest version: 0.2.0

# @mizdra/oxfmt-config

Oxfmt config for @mizdra

## Installation

```bash
npm i -D @mizdra/oxlint-config
```

## Usage

```ts
// oxfmt.config.ts
export { default } from '@mizdra/oxfmt-config';
```
npm package: @mizdra/oxlint-config
Description: Oxlint config for @mizdra
Author: mizdra
Latest version: 0.3.0

# @mizdra/oxlint-config

Oxlint config for @mizdra

## Installation

```bash
npm i -D @mizdra/oxlint-config
```

## Usage

```ts
import { defineConfig } from 'oxlint';
import mizdra from '@mizdra/oxlint-config';

export default defineConfig({
  extends: [
    mizdra.base,
    mizdra.typescript,
    mizdra.node,
    mizdra.react,
  ],
});
```

## Design

- Enable all rules in the `correctness` category
- Do not use `warn` severity; use `error` severity.
  - Allowing both creates uncertainty about which one to use.
  - For consistency, we standardize on `error`.
- Do not enable rules that conflict with oxfmt
- Do not enable rules that can be replaced by TypeScript
  - Examples: `getter-return`, `no-undef`, `no-unreachable`, `react/no-unknown-property`
  - Today, TypeScript is easy to introduce. You can get started quickly with `tsc --init` or `node main.ts`.
  - As a principle, we reduce the number of enabled rules assuming TypeScript is adopted in the project.
- Do not enable rules that get in the way of trial-and-error coding
  - Examples: `no-empty`, `no-empty-function`
  - Code like `() => {}` is undesirable in production, but it appears frequently while coding. Warning on such code often feels noisy to developers.
  - ref: https://www.mizdra.net/entry/2023/01/31/012705
- Do not enable rules that warn about code complexity
  - Examples: `complexity`, `max-nested-callbacks`, `max-params`
  - These rules are intended to encourage refactoring by warning about complexity, but in most cases @mizdra ignores those warnings.
    - Refactoring is not done when a warning appears; it is done when code becomes hard to change without refactoring, or when a better design comes to mind.
  - There is little value in enabling rules that are mostly disabled anyway.
- Do not narrow lint targets with `overrides[].files`
  - Rules from the `typescript` plugin are often limited with `files: ["*.ts"]`, but that should be avoided because code in one language can be embedded in files of another language.
    - For example, `*.vue` can embed TypeScript code inside `<script lang="ts">`.
    - With `files: ["*.ts"]`, those embedded scripts are not covered by the rules.
  - Also, if `"checkJs": true` is set in `tsconfig.json`, `*.js` can be linted with type information as well.
    - Rules from the `typescript` plugin should apply to `*.js`, too.
  - As a principle, it is better to apply all rules to all files.
    - `typescript` plugin rules may run even on `*.vue` files without `<script lang="ts">`, which may slightly increase execution time. But the impact should be minor.
- Do not enable outdated rules
  - Examples: `react/jsx-no-target-blank`, `react/react-in-jsx-scope`
npm package: @mizdra/poke-lcg
Description: The LCG tool for Pokemon
Author: mizdra
Latest version: 0.0.5

# poke-lcg
The LCG tool for Pokemon.


## Feature
- You can get seeds with generator easily.
- Contains ``.d.ts`` files.


## Install
```bash
$ npm install @mizdra/poke-lcg
```


## Usage
```js
import * as Uint32LCG from '@mizdra/poke-lcg/uint32';

const g1 = Uint32LCG.generator(Uint32LCG.GEN3_ARG, 0x00000000);
console.log(Uint32LCG.toHexString(g1.next().value, 8)); // '00006073'
console.log(Uint32LCG.toHexString(g1.next().value, 8)); // 'e97e7b6a'
console.log(Uint32LCG.toHexString(g1.next().value, 8)); // '52713895'

const g2 = Uint32LCG.generator(Uint32LCG.GEN3_ARG, 0x00000000, 3);
const seedList2 = [...g2].map<string>(seed => Uint32LCG.toHexString(seed, 8))
console.log(seedList2); // ['00006073', 'e97e7b6a', '52713895']

const g3 = Uint32LCG.generator(Uint32LCG.GEN3_INVERSE_ARG, 0x52713895, 3);
const seedList3 = [...g3].map<string>(seed => Uint32LCG.toHexString(seed, 8));
console.log(seedList3); // ['e97e7b6a', '00006073', '00000000']
```


## API docs
See [Documentation](http://mizdra.github.io/poke-lcg/).


## Build & Test
```bash
# Setup
$ git clone https://github.com/mizdra/poke-lcg
$ cd poke-lcg
$ npm install
$ npm install -g typescript

# Build
$ npm run build

# Lint
$ npm run lint

# Test
$ npm test
```


## License
MIT License
npm package: @mizdra/poke-nature
Description: ポケモン性格クラス
Author: mizdra
Latest version: 0.2.0

# poke-nature [![npm (scoped)][npm-image]][npm-url] [![Build Status][travis-image]][travis-url]
ポケモン性格クラス。

## 特徴
- TypeScriptによる型補完。

## インストール
```bash
$ npm install @mizdra/poke-nature
```

## 使い方
```js
import {ja as PokeNature} from '@mizdra/poke-nature';

console.log(PokeNature.toNumber('おくびょう')); // 10
console.log(PokeNature.toString(10)); // 'おくびょう'
console.log(PokeNature.getIncreasedStat(10)); // 'すばやさ'
console.log(PokeNature.getDecreasedStat(10)); // 'こうげき'
console.log(PokeNature.getFavoriteFlavor(10)); // 'あまい'
console.log(PokeNature.getDislikedFlavor(10)); // 'からい'
console.log(PokeNature.NAMES); // ['がんばりや', 'さみしがり', ...]
console.log(PokeNature.INCREASED_STATS); // [null, 'こうげき', ...]
console.log(PokeNature.DECREASED_STATS); // [null, 'ぼうぎょ', ...]
console.log(PokeNature.FAVORITE_FLAVORS); // [null, 'からい', ...]
console.log(PokeNature.DISLIKED_FLAVORS); // [null, 'すっぱい', ...]
```

## 対応言語
| de | en | es | fr | it | ja | ko |
|----|----|----|----|----|----|----|
|    |    |    |    |    | ✓ |   |

## ビルド
```bash
$ git clone https://github.com/mizdra/poke-nature.git
$ cd poke-nature
$ npm install
$ npm run build
```

## テスト
```bash
$ npm run test
```

## 構文チェック
```bash
$ npm run lint
```

[npm-image]: https://img.shields.io/npm/v/@mizdra/poke-nature.svg
[npm-url]: https://www.npmjs.com/package/@mizdra/poke-nature
[travis-image]: https://travis-ci.org/mizdra/poke-nature.svg?branch=master
[travis-url]: https://travis-ci.org/mizdra/poke-nature
npm package: @mizdra/poke-nature-util
Description: ポケモン性格ユーティリティクラス
Author: mizdra
Latest version: 0.0.1

# poke-nature-util
ポケモン性格ユーティリティクラス。

## 特徴
- TypeScriptによる型補完。

## インストール
```bash
$ npm install @mizdra/poke-nature-util
```

## ビルド
```bash
$ git clone https://github.com/mizdra/poke-nature-util.git
$ cd poke-nature
$ npm install -g  mocha gulp dtsm
$ npm install
$ dtsm install
$ gulp
```

### テスト
```bash
$ npm test
```
npm package: @mizdra/pokemonsay
Description: Pokemon version of cowsay with CLI and API.
Author: Dylan Frankland
Latest version: 1.0.1

# `pokemonsay`

This package is fork of [dfrankland/pokemonsay](https://github.com/dfrankland/pokemonsay) (License: MIT).

Pokemon version of cowsay with CLI and API.

![][1]

Inspired by another [`pokemonsay`][2] and [`parrotsay-api`][3] I created this to
quell my obsession with Pokemon and command line greetings. This module includes
all Pokemon and forms available on [Bulbapedia][4] excluding shinies, _a total
of **846**_.

## CLI

### Random

Simply call `pokemonsay` to get a random `Wild POKEMON appeared!` message.

### Piping to `STDIN`

Pipe to `pokemonsay` to get a random Pokemon with the piped message below it.

## API

There are a few methods that are available to utilize `pokemonsay` in your own
app/module!

### `iChooseYou`

- Argument: Object `{ number, pokemon, form }`
- Result: Array of Objects `[{ number, pokemon, form, say }]`

Filter through the database using the available info to get matching Pokemon.
The resulting objects in an array will contain the following properties:

- `number`: National Dex number (integer).
- `pokemon`: The name of the Pokemon.
- `form`: The first letter of the form.
  - Example: "A" for Alola Form (Marowak A-form) or "A" for Attack Form
    (Deoxys A-form)
- `say`: The ANSI compatible string meant for `console.log`ging.

### `random`

- Arguments: Integers `min, max`
- Result: Object `{ number, pokemon, form, say }`

Get a random `pokemonsay` object. An optional `min` and `max` argument can be
used to get Pokemon from a specific generation (including their alternate forms
regardless of generation). The resulting object will contain the following
properties:

- `number`: National Dex number (integer).
- `pokemon`: The name of the Pokemon.
- `form`: The first letter of the form.
  - Example: "A" for Alola Form (Marowak A-form) or "A" for Attack Form
    (Deoxys A-form)
- `say`: The ANSI compatible string meant for `console.log`ging.

### `say`

#### default text (`Wild POKEMON appeared!`)

- Arguments: Object `{ pokemon, form, options }`
- Result: String

Returns a string that shows a box with the message `Wild POKEMON appeared!`
with the specified Pokemon and form. The `options` property is an object that
will override the default settings for [`boxen`][5].

#### custom text

- Arguments: Object `{ text, options }`
- Result: String

Returns a string that shows a box with the message specified. The `options`
property is an object that will override the default settings for [`boxen`][5].

[1]: https://raw.githubusercontent.com/dfrankland/pokemonsay/master/demo.png
[2]: https://github.com/possatti/pokemonsay
[3]: https://github.com/matheuss/parrotsay-api
[4]: http://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_National_Pok%C3%A9dex_number
[5]: https://github.com/sindresorhus/boxen
npm package: @mizdra/prettier-config
Description: Shareable Prettier Config for @mizdra
Author: mizdra
Latest version: 0.1.0
Deprecated: This package is renamed. Please use @mizdra/prettier-config-mizdra.

# @mizdra/prettier-config

Shareable Prettier Config for @mizdra

## Install

```bash
yarn add -D @mizdra/prettier-config prettier
```

## Usage

If you have written the prettier configuration in `package.json`:

```json
{
  "name": "your-app",
  "version": "0.0.1",
  "prettier": "@mizdra/prettier-config"
}
```

If you have written the prettier configuration in `.prettierrc.json`:

```json
"@mizdra/prettier-config"
```

If you have written the prettier configuration in `.prettierrc.js`:

```js
module.exports = {
  ...require('@mizdra/prettier-config'),
  // You can override the options of a shared prettier
  // configuration in `.prettierrc.js`
  semi: false,
};
```

## How to release (for Contributor)

```console
$ # Wait for passing CI...
$ git switch master
$ git pull
$ yarn version
$ npm run build
$ npm publish
$ git push --follow-tags
```
npm package: @mizdra/prettier-config-mizdra
Description: Shareable Prettier Config for @mizdra
Author: mizdra
Latest version: 2.0.0

# @mizdra/prettier-config-mizdra

Shareable Prettier Config for @mizdra

## Install

```bash
pnpm add -D @mizdra/prettier-config-mizdra prettier
```

## Usage

If you have written the prettier configuration in `package.json`:

```json
{
  "name": "your-app",
  "version": "0.0.1",
  "prettier": "@mizdra/prettier-config-mizdra"
}
```

If you have written the prettier configuration in `.prettierrc.json`:

```json
"@mizdra/prettier-config-mizdra"
```

If you have written the prettier configuration in `.prettierrc.js`:

```js
module.exports = {
  ...require('@mizdra/prettier-config-mizdra'),
  // You can override the options of a shared prettier
  // configuration in `.prettierrc.js`
  semi: false,
};
```
npm package: @mizdra/tinymt
Description: The JavaScript implements of TinyMT for Pokémon RNG.
Author: mizdra
Latest version: 1.0.1

# js-tinymt

[![Build Status](https://travis-ci.org/mizdra/js-tinymt.svg?branch=master)](https://travis-ci.org/mizdra/js-tinymt)
[![npm version](https://badge.fury.io/js/%40mizdra%2Ftinymt.svg)](https://badge.fury.io/js/%40mizdra%2Ftinymt)

The JavaScript implements of TinyMT for Pokémon RNG.


## :warning: Note :warning:
This library is not designed for common use, but for **Pokémon RNG**.
If you want to use for simulation and numerical analysis and so on,
**I recommend other library**.


## Installation

```bash
$ npm install @mizdra/tinymt -S
# or
$ yarn add @mizdra/tinymt
```


## Usage
```js
import * as assert from 'assert'
import { Tinymt32 } from '@mizdra/tinymt'

function u32 (num) {
  return num >>> 0
}
const param: Tinymt32.Param = {
  mat1: 0x8F7011EE,
  mat2: 0xFC78FF1F,
  tmat: 0x3793fdff,
}
const seed = 1
const status = [0xCCA24D8, 0x11BA5AD5, 0xF2DAD045, 0xD95DD7B2]

// Tinymt32.fromSeed(param, seed)
const rng1 = Tinymt32.fromSeed(param, seed)
assert(u32(rng1.gen()) === 2545341989)
assert(u32(rng1.gen()) === 981918433)
assert.deepEqual(
  [...Array(2)].map((_) => u32(rng1.gen())),
  [3715302833, 2387538352],
)

// Tinymt32.fromStatus(param, status)
const rng2 = Tinymt32.fromStatus(param, status)
rng2.nextState()
assert(u32(rng2.temper()) === 2545341989)
assert(u32(rng2.gen()) === 981918433)
assert(u32(rng2.temper()) === 981918433)
for (let i = 0; i < 2; i++) { rng2.nextState() }
assert.deepEqual(
  rng1.status().map(u32),
  rng2.status().map(u32),
)
```


## Suppoerted Feature of MersenneTwister-Lab/TinyMT
- [x] tinymt32
  - [x] tinymt32_next_state
  - [x] tinymt32_temper
  - [x] tinymt32_generate_uint32
  - [ ] tinymt32_generate_float
  - [ ] tinymt32_generate_float01
  - [ ] tinymt32_generate_float12
  - [ ] tinymt32_generate_floatOC
  - [ ] tinymt32_generate_floatOO
  - [ ] tinymt32_generate_32double
- [ ] tinymt64
  - [ ] tinymt64_next_state
  - [ ] tinymt64_temper
  - [ ] tinymt64_generate_uint64
  - [ ] tinymt64_generate_double
  - [ ] tinymt64_generate_double01
  - [ ] tinymt64_generate_double12
  - [ ] tinymt64_generate_doubleOC
  - [ ] tinymt64_generate_doubleOO

## License
- js-tinymt: [LICENSE](https://raw.githubusercontent.com/mizdra/js-tinymt/master/LICENSE)
  - Special Thanks: @odanado (ref: [RNGeek/SMBQT](https://github.com/RNGeek/SMBQT))
- [MersenneTwister-Lab/TinyMT](https://github.com/MersenneTwister-Lab/TinyMT): [LICENSE_TINYMT](https://raw.githubusercontent.com/mizdra/js-tinymt/master/LICENSE_TINYMT) (Original: [LICENSE.txt](https://raw.githubusercontent.com/MersenneTwister-Lab/TinyMT/master/LICENSE.txt))