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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hinjs-cli

v0.3.0

Published

Transpiler for the HinJS language (.hjs) - Write JavaScript using Hindi keywords!

Readme

HinJS CLI 🇮🇳 ↔️ 📝

Write JavaScript using simple Hindi keywords!

HinJS is an experimental programming language concept that acts as a superset of JavaScript. It allows developers to write code using Hindi keywords (rakho, kaam, agar, likho, etc.) in .hjs files, which are then transpiled into standard, executable JavaScript (.js) files.

The goal is to make coding feel more intuitive and accessible for Hindi speakers, especially those new to programming, or just for fun!

🤔 Why HinJS?

Accessibility: Lowers the initial barrier for Hindi speakers learning to code.

Fun: Provides a novel and potentially entertaining way to write familiar JavaScript logic.

Experimentation: Explores the idea of culturally adapted programming language syntax.

Disclaimer: HinJS is currently experimental. While it covers many basic JavaScript keywords, complex JS features or edge cases might not be fully supported or behave exactly as expected. It relies on a preprocessing step and Babel transformations.

✨ Features

Transpiles .hjs source files to standard .js.

Replaces core JavaScript keywords with simple Hindi equivalents.

Supports single file compilation (hinjs input.hjs).

Supports directory compilation (hinjs src -d dist).

Generates JavaScript source maps (.js.map) for easier debugging.

Installable via npm.

🚀 Installation

You can install HinJS CLI globally or locally in your project.

Global Installation (recommended for trying it out):

npm install -g hinjs-cli

Now you can use the hinjs command anywhere.

Local Installation (recommended for projects):

cd your-project/ npm install --save-dev hinjs-cli

Or using Yarn:

cd your-project/ yarn add --dev hinjs-cli

When installed locally, you can run it via npx hinjs or add it to your package.json scripts.

💻 Usage

The hinjs command transpiles .hjs files or directories into .js.

  1. Compile a Single File:

hinjs path/to/your/file.hjs

Example: hinjs app.hjs creates app.js and app.js.map.

  1. Compile Single File to Specific Output:

hinjs input.hjs -o output/bundle.js

OR

hinjs input.hjs --out-file output/bundle.js

  1. Compile an Entire Directory:

hinjs ./src -d ./dist

OR

hinjs ./path/to/source --out-dir ./path/to/output

This will find all .hjs files in the source directory, transpile them, and recreate the same directory structure in the output directory with .js files.

  1. Get Help:

hinjs --help

Example package.json Script:

{ "name": "my-hinjs-project", "version": "1.0.0", "scripts": { "build": "hinjs ./src -d ./dist", "start": "npm run build && node ./dist/main.js" }, "devDependencies": { "hinjs-cli": "^0.1.0" } }

Now you can run npm run build to compile your project.

📝 Example HinJS Code

Input (example.hjs):

// example.hjs using simple Hindi words sthir greeting = "Namaste Duniya"; rakho score = 80;

kaam calculateGrade(s) { agar (s > 90) { lautao "A"; } warna agar (s > 75) { lautao "B"; } warna { lautao "C"; } }

likho(greeting); likho("Grade:", calculateGrade(score));

rakho count = 0; dohrao (count < 3) { // Translates to while loop likho("Ginti:", count); count = count + 1; }

koshish { likho("Sab theek hai."); } pakdo (error) { likho("Gadbad:", error.message); }

Command:

hinjs example.hjs

Output (example.js):

const greeting = "Namaste Duniya"; let score = 80;

function calculateGrade(s) { if (s > 90) { return "A"; } else if (s > 75) { return "B"; } else { return "C"; } }

console.log(greeting); console.log("Grade:", calculateGrade(score));

let count = 0; while (count < 3) { console.log("Ginti:", count); count = count + 1; }

try { console.log("Sab theek hai."); } catch (error) { console.log("Gadbad:", error.message); }

🔑 Keyword Mapping

HinJS replaces standard JavaScript keywords with Hindi equivalents:

🤝 Contributing

This is an experimental project! Contributions, bug reports, and suggestions are welcome. Please feel free to open an issue or submit a pull request on the GitHub Repository.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


Before Saving:

  1. Replace Placeholders: Update npm badge links and GitHub repository details.

  2. Create a LICENSE file: If using MIT, include a license file.

  3. Commit: Add README.md and LICENSE to your repository.

This README provides a solid foundation for explaining your project to others.