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

pear-lang

v0.2.7

Published

Pear scripting language - now with Discord/HTTP

Readme

Pear

Status

Pear is now archived and will no longer receive updates.

This project was an early-stage prototype exploring a custom scripting language and runtime. It reached a natural stopping point as the design scope expanded beyond its original intent.


Pear is a lightweight scripting language designed for clarity, flexibility, and fast automation.

It is not based on JavaScript or Lua, but it supports similar capabilities such as functions, tables, arrays, and modules while using its own syntax and execution model.

Pear is built for scripting, bots, tools, and extensible automation systems.


Current Features

Pear currently supports:

Core language

  • let variables (declaration)
  • set assignments (update values)
  • Numbers, strings, booleans, and null
  • Expressions (math + logic operators)
  • if / else conditionals
  • while loops
  • return statements in functions

Functions

  • First-class functions (fn)
  • Function parameters
  • Closures (functions can capture variables)
  • Return values

Data structures

  • Arrays: []
  • Tables (maps / objects): { key: value }
  • Nested structures supported

Modules

  • import "file.pear" for file-based module loading

Standard runtime

Built-in global functions:

  • print(...) → output to console
  • sleep(ms) → async delay
  • length(value) → get size of arrays/strings

Developer tools

Pear includes a full CLI toolchain:

  • pear run <file> → execute a script
  • pear repl → interactive shell
  • pear eval "<code>" → execute inline code
  • pear version → show version

Error system

  • Runtime errors include line and column numbers
  • Parser errors show descriptive messages
  • Stack-safe execution model (no raw JS traces exposed to user code)

Runtime

Pear runs on a custom interpreter built in Node.js.

The execution pipeline is:

Source Code ↓ Tokenizer ↓ Parser (AST) ↓ Pear VM (Evaluator) ↓ Runtime Environment (JS bridge)


Installation

Prerequisite

  • Node.js 16+

Install globally via npm:

npm install -g pear-lang

Usage

Run a file

pear run script.pear

Start REPL

pear repl

Evaluate inline code

pear eval "print('hello')"

Example

let x = 10

fn add(a, b):
    return a + b
end

let result = add(5, 7)

print(result)

Philosophy

Pear is designed around three principles:

  • Clarity over complexity
  • Control over abstraction
  • Predictable execution

It aims to give scripting power similar to Lua and JavaScript without copying their syntax or runtime behavior.


Future roadmap

Planned features:

  • Bytecode VM (performance upgrade)
  • Package manager (pear install)
  • Module exports (export)
  • Async/await system
  • Better debugging tools (stack traces, breakpoints)
  • Standard library expansion