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

onepiece-lang

v1.0.8

Published

πŸ΄β€β˜ οΈ A pirate-themed programming language that compiles to JavaScript

Readme

πŸ“š Table of Contents

A domain-specific pirate-themed programming language that compiles .onepiece code to JavaScript.

Write code like a pirate. Sail through syntax. Claim your treasure. 🦜


πŸ“¦ Installation

npm install -g onepiece-lang

This installs the onepiece CLI globally.


πŸš€ Usage

onepiece run <file.onepiece>

Compiles a .onepiece file into JavaScript (output.js by default).

Example

onepiece run examples.onepiece
node output.js

πŸ’¬ Language Syntax

πŸ’‘ Variable Declaration

temporaryBounty coins = 100     // let
permanentBounty name = "Luffy"  // const

πŸ’‘ Conditionals

hasHaki (coins > 50)
  echoDenDen("You’re rich!")
noHaki
  echoDenDen("Not enough Berries.")
DockAtHarbor

πŸ’‘ Functions

crewSkill cheer() {
  echoDenDen("I will become the Pirate King!")
}
cheer()

πŸ’‘ Loops

sailThrough (let i = 0; i < 5; i++)
  echoDenDen(i)
DockAtHarbor

πŸ’‘ While Loops

untilRaftel (health > 0)
  echoDenDen("Keep sailing!")
  health--
DockAtHarbor

πŸ’‘ Return, Break

claimTreasure "One Piece is real!"   // return
abandonShip                          // break

πŸ“˜ Core Keywords

| OnePiece Keyword | JavaScript Equivalent | | ----------------- | --------------------- | | temporaryBounty | let | | permanentBounty | const | | hasHaki | if | | noHaki | else | | DockAtHarbor | } (block end) | | crewSkill | function | | echoDenDen() | console.log() | | sailThrough | for loop | | untilRaftel | while loop | | claimTreasure | return | | abandonShip | break |


πŸ§ͺ Sample Program

File: examples.onepiece

temporaryBounty bounty = 3000

hasHaki (bounty > 1000)
  echoDenDen("High bounty pirate!")
noHaki
  echoDenDen("Still a rookie.")
DockAtHarbor

crewSkill attack() {
  echoDenDen("Gomu Gomu no Pistol!")
}
attack()

Output: output.js

let bounty = 3000;

if (bounty > 1000) {
  console.log("High bounty pirate!");
} else {
  console.log("Still a rookie.");
}

function attack() {
  console.log("Gomu Gomu no Pistol!");
}
attack();

βš™οΈ CLI Reference

| Command | Description | | ------------------------ | ---------------------------------- | | onepiece run <file> | Compile .onepiece to output.js | | onepiece --help | Show usage/help menu | | onepiece --jolly-roger | Display themed ASCII banner |


🧩 Project Structure

.
β”œβ”€β”€ examples.onepiece     // Pirate-style source code
β”œβ”€β”€ output.js             // JS output
β”œβ”€β”€ compiler.js           // Compiler runner
β”œβ”€β”€ parser.js             // Translates lines to JS
β”œβ”€β”€ lexer.js              // Tokenizer
β”œβ”€β”€ phrases.js            // Keyword mappings
β”œβ”€β”€ postinstall.js        // Installation banner
└── package.json          // CLI configuration

πŸ› οΈ Developing

To work locally on the compiler:

git clone https://github.com/deepaksarun/onepiece-lang.git
cd onepiece-lang
npm install
npm link     # For local CLI testing

Then run:

onepiece run examples.onepiece

✨ Coming Soon

  • πŸ–Š Syntax highlighting for VS Code
  • πŸ§ͺ REPL: onepiece shell
  • 🌍 GitHub Pages documentation
  • πŸ“¦ Playground: OnePieceLang Web Compiler

πŸ“œ License

MIT β€” Use across all Grand Line territories. 🌊



Credits & Disclaimer

OnePiece Lang is a fan-made tribute to the legendary anime and manga One Piece.
It is not affiliated with, endorsed by, or officially licensed by Eiichiro Oda, Toei Animation, Shueisha, or any other official rights holders.

  • πŸ–Š Original Series by: Eiichiro Oda
  • πŸŽ₯ Anime by: Toei Animation
  • πŸ“š Manga Publisher: Shueisha, Weekly Shōnen Jump

All characters, settings, and themes are properties of their respective copyright holders.

This project exists solely for educational and entertainment purposes.
No commercial usage is intended.

πŸ΄β€β˜ οΈ From one Straw Hat fan to another: May your code always find LaughTale!


πŸ‘‘ Created By

Deepak Sarun

🧭 "If (Exists): { I build }"

Follow the voyage: github.com/deepaksarun



---

## β˜‘οΈ What’s Next?

Would you like me to:

- Convert this to live GitHub Pages docs?
- Scaffold a `docs/` folder with markdown for each keyword?
- Create a PirateLang Playground UI (via React or Next.js)?
- Add JSDoc-style inline docs to your codebase?

You're building the pirate equivalent of Python, Captain. Let’s raise the sails 🚒