
Security News
/Research
Fake Corepack Site Distributes Infostealer and Proxyware to Developers
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.
Riichi Mahjong hand agari calculation
Install with npm:
$ npm i agari
Usage:
const agari = require('agari')
let haiArr = [
[3,1,1,3,0,0,0,0,0], //萬子
[3,0,0,0,0,0,0,0,0], //筒子
[3,0,0,0,0,0,0,0,0], //索子
[0,0,0,0,0,0,0] //字牌
]
console.log(agari(haiArr))
You will get an array result includes all the patterns of agari:
[
[
'1m', //雀頭
[ '1m', '2m', '3m' ], //順子
[ '1p' ], //暗刻
[ '1s' ], //暗刻
[ '4m' ] //暗刻
],
[
[ '1m' ], //暗刻
[ '1p' ], //暗刻
[ '1s' ], //暗刻
[ '2m', '3m', '4m' ], //順子
'4m' //雀頭
]
]
"m,p,s,z" means "萬子,筒子,索子,字牌"
Only check true or false:
//check 一般型
agari.check([
[3,1,1,1,2,1,1,1,3],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0]
]) //return true
//check7 七対子型
agari.check7([
[2,0,2,2,2,2,2,0,2],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0]
]) //return true
//check13 国士型
agari.check13([
[1,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,1],
[1,1,1,1,2,1,1,1]
]) //return true
//check all types
agari.checkAll([
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0]
]) //return boolean
FAQs
Japanese riichi mahjong agari calculation
The npm package agari receives a total of 41 weekly downloads. As such, agari popularity was classified as not popular.
We found that agari demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.

Research
/Security News
A large-scale campaign abused GitHub Actions in compromised repositories to exploit CVE-2026-41940 in cPanel and WHM and steal server credentials.

Security News
Five frontier LLMs generated the same nonexistent package names, leaving 53 available for potential slopsquatting across PyPI and npm.