npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tanemaki

v0.1.0

Published

日本語のリアルなテストデータを整合性つきで生成する種まきツール。氏名・住所・メール・電話番号などをseed再現性つきで生成します。

Readme

tanemaki 🌱

日本語のリアルなテストデータを 整合性再現性(seed) つきで生成する、種まきツール。

Prisma の seed スクリプトなど、TypeScript でテストデータを大量に作りたい場面向け。氏名・住所・メール・電話番号などを、フィールド間で矛盾しない形で生成できます。

特長

  • 日本語のリアルさ: 漢字氏名+ふりがな+ローマ字、郵便番号↔都道府県の整合、日本の電話番号形式。
  • 整合の取れたセット: person() の email は氏名ローマ字と一致。住所の郵便番号と都道府県が矛盾しない。
  • seed再現性: new Tanemaki({ seed: 42 }) なら何回・どのマシンでも同じ結果。テスト失敗の再現やCI安定化に。
  • 依存ゼロ / ESM・CJS両対応 / 型定義つき

インストール

npm install tanemaki

使い方

import { Tanemaki } from "tanemaki";

const t = new Tanemaki({ seed: 42 }); // seed省略で毎回ランダム

t.person();
// {
//   lastName: "山田", firstName: "太郎",
//   lastNameKana: "やまだ", firstNameKana: "たろう",
//   lastNameRomaji: "yamada", firstNameRomaji: "taro",
//   fullName: "山田 太郎", fullNameKana: "やまだ たろう",
//   gender: "male"
// }

t.address();
// { postalCode: "150-0043", prefecture: "東京都", city: "新宿区", rest: "3-12-5", full: "東京都新宿区3-12-5" }

const p = t.person();
t.email({ person: p }); // 氏名ローマ字と整合: "[email protected]"
t.phone({ type: "mobile" }); // "090-1234-5678"

Prisma seed での例

const t = new Tanemaki({ seed: 1 });

await prisma.user.createMany({
  data: t.many(100, (g) => {
    const p = g.person();
    return {
      name: p.fullName,
      email: g.email({ person: p }),
      phone: g.phone(),
    };
  }),
});

API(v0.1)

| メソッド | 返り値 | | --- | --- | | string(length?) | ランダム英数字文字列 | | int(min, max) | ランダム整数(両端含む) | | bool() | boolean | | pick(items) | 配列から1要素 | | uuid() | UUID v4 | | person(opts?) | 人物オブジェクト(漢字/かな/ローマ字/性別) | | fullName(opts?) | 氏名文字列 | | address() | 住所オブジェクト(郵便番号↔都道府県が整合) | | postalCode() | "123-4567" | | email(opts?) | メール(personで氏名と整合) | | phone(opts?) | 日本の電話番号 | | many(n, fn) | fnをn回実行して配列に |

ライセンス

MIT