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

armony

v0.4.11

Published

Yet Another Typescript Framework

Readme

Armony

Yet another typescript framework for Node.js application

Armony is a small framework to use on your typescript backend projects to easily add some cool features:

  • Dependency injection with customizable binding
  • Singleton logic
  • Bootable provider logic
  • Observer pattern
  • Quick config files loading

Install

Armony use pnpm, but you can install it with any package manager:

$ pnpm i armony
$ npm i armony
$ yarn add armony

Typical Usage

The main purpose of armony is to standardize your base application logic between backend typescript projects. It provides a binding for classes for dependency injection

import { Armony, ArmonyConfig, Environment, Injection, LoggerConfig } from 'armony';
import winston from 'winston';

// Customize default config
const armonyConfig = new ArmonyConfig({
    env: (process.env.NODE_ENV as Environment) || 'production',
    debug: false,
    locale: 'fr',
    timezone: 'UTC',
});

// As a good practice, Armony forces you to have a logger
// Default one is Winston
const loggerConfig = new LoggerConfig({
    transports: [
        new winston.transports.Console({
            level: 'debug',
            format: winston.format.combine(winston.format.colorize(), winston.format.simple(), winston.format.timestamp()),
        }),
    ],
});

// Instanciate your armony app with its config
const armony = new Armony(armonyConfig);

// Add any other configuration file
armony.setConfig(loggerConfig);

// Create your first provider
// Armony will be automatically injected if you add the @Injection decorator
@Injection
class MyFirstProvider {
    constructor(private armony: Armony) {}

    public foo() {
        console.log('armony:');
        console.log('env: ', this.armony.config.env);
        console.log('locale: ', this.armony.config.locale);
    }
}

// Create any other provider
// Dependencies will be injected automatically if you add @Injection decorator
@Injection
class MySecondProvider {
    constructor(
        private armony: Armony,
        private firstProvider: MyFirstProvider,
    ) {}

    public foo() {
        this.firstProvider.foo();
    }
}

// Declare providers to armony
armony.bindProvider(MyFirstProvider);
armony.bindProvider(MySecondProvider);

// Boot armony
armony.boot().then(() => {
    // use Armony as a factory that will inject dependencies for you
    const mySecondProvider = armony.provider(MySecondProvider);
    mySecondProvider.foo();
});