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

hubot-mahjong

v0.0.4

Published

Hubot script for mahjong. Calc points, Record game.

Readme

hubot-mahjong

麻雀の点数計算や点数記録をするHubotスクリプトです。

Installation

npmからインストールしてください。

npm install hubot-mahjong --save

external-scripts.jsonに以下の1行を追加してください。

[
  "hubot-mahjong"
]

点数記録したデータを永続化したい場合は、hubot-redis-brain などを導入してください。

Usage

メンションは必要ありません。モバイルでの使用を想定して、入力文字数を極力少なくしています。

点数計算

# 書式: mj <符> <翻>

mj 30 4

# => 30符4翻の点数は、7700(2000/3900)です。

点数記録

# 点数記録開始
# 書式: mj start <プレイヤー名> <プレイヤー名> <プレイヤー名> <プレイヤー名>

mj start foo bar baz qux

# => fooさん、barさん、bazさん、quxさんの点数記録を開始します。
#    ルール:
#    ・ウマ10-20 (mj rule uma 10-20)
#    ・25000点持ち (mj rule genten 25000)
#    ・30000点返し (mj rule kaeshi 30000)
#    ・点0.5 (mj rule ten 0.5)
#    飛び賞や役満祝儀は修正コマンド(mj mod)で修正してください:pray:
#    順位が変わらない場合は、点数に計上してから記録しても問題ないです。
#    それでは皆さんがんばってください!:tada:


# 点数記録
# 書式: mj reg <点数> <点数> <点数> <点数>

mj reg -1000 20000 25000 56000

# => 半荘1回目:
#     fooさん -51、barさん -20、bazさん 5、quxさん 66
#     (修正コマンド:mj mod #1 -51 -20 5 66)
#    トータル:
#     fooさん -51、barさん -20、bazさん 5、quxさん 66


# 点数記録終了
# 書式: mj end

mj end

# => おつかれさまでした:clap:
#    半荘1回を0.5で計算:
#     fooさん -2550、barさん -1000、bazさん 250、quxさん 3300
#    ---
#    トータル:
#     fooさん -51、barさん -20、bazさん 5、quxさん 66
#    半荘:
#     #1:fooさん -51、barさん -20、bazさん 5、quxさん 66

点数の再表示、点数の修正、ルールの調整

# 点数再表示
# 書式: mj show

mj show

# => トータル:
#     fooさん -51、barさん -20、bazさん 5、quxさん 66
#    半荘:
#     #1:fooさん -51、barさん -20、bazさん 5、quxさん 66
#    ルール:
#    ・ウマ10-20 (mj rule uma 10-20)
#    ・25000点持ち (mj rule genten 25000)
#    ・30000点返し (mj rule kaeshi 30000)
#    ・点0.5 (mj rule ten 0.5)


# 点数修正
# 書式: mj mod <半荘> <得点> <得点> <得点> <得点>

mj mod #1 -50 -20 5 65

# => 半荘1回目:
#     fooさん -50、barさん -20、bazさん 5、quxさん 65
#     (修正コマンド:mj mod #1 -51 -20 5 66)
#    トータル:
#     fooさん -50、barさん -20、bazさん 5、quxさん 65


# ルールの調整
# 書式: mj rule (uma|genten|kaeshi|ten) <設定値>

mj uma 10-30

# => ルールを変更しました。
#    ・ウマ10-30