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

kokoscript

v1.0.0

Published

日本語で書けるJavaScriptサブセット言語

Readme

🈁 KokoScript

日本語で書けるJavaScriptサブセット言語

概要

KokoScriptは、「日本語で自然に書けるJavaScript」を目指した日本語ベースのプログラミング言語です。 句読点(、と。)を使って文を区切ることで、スペース不要で日本語のように読めるコードを書けます。 内部的にはJavaScriptにトランスパイルされます。

特徴

  • 日本語のキーワードを使用
  • 句読点(、。)で文を区切る
  • スペース不要
  • JavaScriptへ自動変換
  • シンプルで学びやすい構文

サンプルコード

変数、名前は「太郎」。
もし、名前が「太郎」ならば、
  「こんにちは!」を表示。
終わり。

ディレクトリ構成

.
├── docs/            # ブラウザ向けプレイグラウンド
├── scripts/         # ユーティリティスクリプト
├── src/
│   ├── cli/         # CLI / REPL エントリーポイント
│   └── compiler/    # レキサー・パーサー・コード生成
└── tests/
    ├── basic.test.js
    └── examples/    # 各種サンプル .koko

CLI

KokoScriptにはコンパイラCLI koko が付属しています。
npm install --global kokoscript でインストールすると、システム全体で koko コマンドが使えます。

# 初回インストール
npm i -g kokoscript

# .koko -> .js を出力
koko tests/examples/basic.koko --outDir dist

# REPL モード
koko --repl

--outDir を省略すると、入力ファイルと同じディレクトリに .js が生成されます。
複数ファイルを指定した場合は順次コンパイルされ、相対パスを維持したまま outDir に配置されます。

開発

npm install
npm run cli tests/examples/basic.koko     # 生成されたJSを表示して実行(eval)
npm run repl                 # 対話モード
npm test                     # Nodeテスト
npm run build:browser        # docs/kokoscript-bundle.js を再生成