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

sor

v2.0.0

Published

Javascript practice problem tool

Readme

sor

Build Status Coverage Status Chat on Gitter

Sor is a tool for checking your answers to a collection of curated programming practice challenges. Pick a problem that you want to solve from sorjs.com, create a file with a function matching the specified name for the problem, and run:

sor your-file.js

Running the sor command downloads and runs a set of pre-configured tests for the problem that you specify. You'll receive output as the tests run indicating which tests pass and fail.

Note that each file can only contain a solution to a single problem.

Installation

Sor should be installed globally; run npm install -g sor and you should be set. You may need to run this command with administrator privileges if you haven't fixed npm permissions: sudo npm install -g sor.

Submitting new problems

The practice problem archive is built by its community. See our submission guidelines.

Mentor testing framework

Mentor is a simple framework for testing and providing feedback for function execution; it's similar in some ways to unit testing frameworks but is dramatically simplified and has some additional features that are targeted at providing more meaningful feedback in the context of practicing. You can see lots of examples of Mentor tests in the sorjs.com repository.

Mentor breaks tests into individual trials; reports are avaialble overall for tests and individually for each trial. There are two ways to test outcomes: produces() to test return values, or examine() to test more complex behaviors. You can provide feedback in the case of trial failure using the otherwise() function.

// If you're writing challenge tests for sorjs, make sure to use the SOR_MENTOR_PATH env variable
// instead of a local path. See other examples in the sorjs.com repository.
const runner = require('sor/mentor/runner');

// Example function
const add = (x, y) => x + y;

// Create a new test which will be composed of multiple trials. All trials will be targeted at the 
// add function. If we want to test another function, we should create another test.
const test = runner.test(add);

// Create a trial to test whether add(4, 5) gives us 9
test.trial(4, 5).produces(9); 
// Create a trial testing that add(-2, 3) === 1, and provide a tip if not
test.trial(-2, 3).produces(1).otherwise('Beware negative numbers!');

// Create a trial testing that add(6, 1) produces an odd number. Will evaluate to
// a success if the first and second argument to outcome() are the equivalent, or a failure otherwise.
test.trial(6, 1)
    .examine(fn => runner.outcome('odd number', fn() % 2 === 1 ? 'odd number' : 'even number'));

test.trial(0, 0)
    .examine(fn => runner.outcome('odd number', fn() % 2 === 1 ? 'odd number' : 'even number'))
    .otherwise('Do you properly handle zero?');