
Research
/Security News
npm Package Uses Prompt Injection and Token Flooding to Disrupt AI Malware Scanners
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.
麻雀アガリ和了形計算
Japanese riichi mahjong hand agari calculation
Install with npm:
# npm i agari
Use in browser:
<script src="https://cdn.jsdelivr.net/npm/agari"></script>
Usage:
const agari = require('agari')
let hai = [
[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(hai))
Output:
[
//和了形1
[
'1m', //雀頭
[ '1m', '2m', '3m' ], //順子
[ '1p' ], //刻子
[ '1s' ], //刻子
[ '4m' ] //刻子
],
//和了形2
[
[ '1m' ], //刻子
[ '1p' ], //刻子
[ '1s' ], //刻子
[ '2m', '3m', '4m' ], //順子
'4m' //雀頭
]
]
"m,p,s,z" means "萬子,筒子,索子,字牌"
"1z-7z" means "東南西北白發中"
Check only:
const agari = require('agari')
//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]
]) //return true
//check all types
agari.checkAll([
[1,1,1,1,1,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 134 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.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.