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

odyc

v0.0.125

Published

A tiny JavaScript library to create narrative games with pixels, sounds, and text.

Readme

odyc.js

Odyc.js is a tiny JavaScript library designed to create narrative games by combining pixels, sounds, text, and a bit of logic. Everything is built through code, but without unnecessary complexity: your entire game can fit in a single file.

🔗 Get startedhttps://odyc.dev

Contributing

We welcome contributions to Odyc.js! Whether you're fixing bugs or adding features your help is appreciated.

Getting Started

  1. Fork and clone the repository
  2. Install dependencies: npm install
  3. Install browser dependencies: npx playwright install
  4. Build the library: npm run build
  5. Run tests: npm run test

Development Workflow

  • Development mode: npm run dev (watches for changes and rebuilds)
  • Type checking: npm run lint
  • Format code: npm run format
  • Run all checks: npm run prepublishOnly (lint + build + test)

Submitting Changes

  1. Create a branch for your feature or fix
  2. Make your changes following existing patterns
  3. Add tests for new functionality
  4. Ensure all tests pass: npm run test:once
  5. Check code quality: npm run lint && npm run format:check
  6. Submit a pull request with a clear description of your changes

Tests

Writing tests

  1. Decide if test is visual or functional, and based on that, enter correct directory in ./tests/.

Visual is test that ensures pixels on screen has correct color. Functional is test that ensures state of game (like player position)

  1. Copy any existing test, ideally similar to yours, as a "template". Make sure to update:
  • Test directory name
  • Test test description in test() parameter in index.test.js
  • Test code itself (assertions)
  • Test game code in index.js
  1. Run test to ensure it passes (explained in section below)

Follow these rules when writing tests:

  • Write mostly functional tests. Only use visual tests when necessary, and keep them minimal.
  • Write small test files. You can do many assertions, but make sure they tell a story together.
  • All tests should assert failures as well. Ensure such "problem" behaves as expected.
  • Relay on game state. If not possible, use state object.
  • Always have some assertion after doing action on game.
  • Visual tests generate first snapshot. Ensure it looks as expected, or delete it and try again.
  • Visual tests must use 2^n for all sizes. Map width 4, sprite size 8, tile size 16, and similar. This prevents half-pixel bugs.
  • Visual tests must use assertEventuelly for parts of test that take and assert screenshot

Tips and tricks:

  • Failed tests generate image in __screenshots__, to show state in which it failed.
  • Keep CLI with tests running. Only changed tests will re-run, making experience quicker.

Running tests

  1. Install dependencies: npm install
  2. Install headless browser: npx playwright install
  3. Build Odyc.js: npm run build
  4. Run tests: npm run test