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

sans-lang

v1.0.6

Published

Desi Sanskrit Programming Language CLI

Readme

sans-lang (Desi Sanskrit Programming Language)

A programming language that blends Sanskrit syntax with JavaScript semantics.

Installation

npm install -g sans-lang


## RUN

dspl <filename.dspl>


#### Structure 
Every DSPL program starts with `प्रारम्भः` (`praarambhah`/begin) and ends with `समाप्तिः` (`samaaptih`/end).  

प्रारम्भः  
    // Code  
समाप्तिः  

Comments

Use भाष्यम् (bhaashyam) for single-line comments.

भाष्यम् यह टिप्पणी है (This is a comment)


---

### 2. Variables and Data Types 
DSPL supports dynamic typing. Declare variables with `स्थिरः` (`sthiroh`/constant) or `चलः` (`chalah`/variable).  

| Data Type       | Keyword      | Example                   |
|-----------------|--------------|---------------------------|
| Integer         | पूर्णांकः        | पूर्णांकः अ = ५;          |
| Float           | दशमलवः      | दशमलवः ब = ३.१४;         |
| String          | शब्दः        | शब्दः स = "नमस्ते";      |
| Boolean         | सत्यम्        | सत्यम् सत्य = सत्य;      |

**Example**:  

चलः पूर्णांकः संख्या = १०;
स्थिरः शब्दः नाम = "रामः";

3. Functions

Define functions with कार्यम् (kaaryam/function). Use फलम् (phalam/return) to return values.

Syntax

कार्यम् नाम(परामितिः) आरम्भः  
    // Logic  
    फलम् मान;  
समाप्तिः  

Example: Add two numbers

कार्यम् योगः(पूर्णांकः अ, पूर्णांकः ब) आरम्भः  
    फलम् अ + ब;  
समाप्तिः  

प्रारम्भः  
    पूर्णांकः उत्तर = योगः(३, ५);  
समाप्तिः  

4. Conditional Statements

If-Else

Use यदि (yadi/if), अथ (atha/else), and अथचेत् (athachet/else if).

Syntax:

यदि (अ == ब) आरम्भः
// Code
अथचेत् (अ > ब) आरम्भः
// Code
अथ आरम्भः
// Code
समाप्तिः


**Example**:  

चलः पूर्णांकः अ = ५;  
यदि (अ % २ == ०) आरम्भः  
    प्रदर्शय("समः");  
अथ आरम्भः  
    प्रदर्शय("विषमः");  
समाप्तिः  

5. Loops

For Loop

Use चक्रम् (chakram/loop) for iterations.

Syntax:

चक्रम् (चलः पूर्णांकः i = ०; i < ५; i = i + १) आरम्भः
// Code
समाप्तिः


**Example**: Print numbers 1–5  

चक्रम् (चलः पूर्णांकः i = १; i <= ५; i = i + १) आरम्भः  
    प्रदर्शय(i);  
समाप्तिः  

While Loop

Use यावत् (yaavat/while).

Syntax:

यावत् (अ < ब) आरम्भः  
    // Code  
समाप्तिः  

6. Error Handling

Use प्रयत्नम् (prayatnam/try) and अपवादः (apavaadah/catch).

Syntax:

प्रयत्नम् आरम्भः  
    // Code  
समाप्तिः  
अपवादः (भूलः ई) आरम्भः  
    प्रदर्शय(ई.सन्देशः);  
समाप्तिः  

7. Sample Programs

Factorial Calculation

कार्यम् क्रमगुणनम्(पूर्णांकः n) आरम्भः  
    यदि (n == ०) आरम्भः  
        फलम् १;  
    अथ आरम्भः  
        फलम् n * क्रमगुणनम्(n - १);  
    समाप्तिः  
समाप्तिः  

प्रारम्भः  
    प्रदर्शय(क्रमगुणनम्(५));  // Output: १२०  
समाप्तिः  

Fibonacci Series

कार्यम् फिबोनाची(पूर्णांकः n) आरम्भः  
    पूर्णांकः अ = ०, ब = १, अस्थायी;  
    चक्रम् (पूर्णांकः i = ०; i < n; i = i + १) आरम्भः  
        अस्थायी = अ;  
        अ = ब;  
        ब = अस्थायी + ब;  
        प्रदर्शय(अ);  
    समाप्तिः  
समाप्तिः  

शुभं भवतु!