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

configorium

v0.0.3

Published

๐Ÿ“ฆโœ๏ธ Effortlessly manage configs with nyxdefaults! Simplify your config read/write process. Get started now!

Readme

cover npm version npm downloads bundle License

๐Ÿ”๐ŸŒ Discover the perfect JavaScript environment with Configorium! This powerful package offers lightning-fast detection of the current environment with incredible accuracy. ๐Ÿ•ต๏ธโ€โ™‚๏ธ Easily tailor your code to the right environment and avoid compatibility issues with the advanced detection capabilities of Configorium. ๐Ÿ’ช๐Ÿผ Take your development to the next level and ensure optimal performance with Configorium!

๐Ÿ“ฆ Installation

Install:

# nyxi
nyxi configorium

# pnpm
pnpm add configorium

# npm
npm install configorium

# yarn
yarn add configorium

Import Configorium into your Node.js project:

// CommonJS
const { read, update, write } = require('configorium')

// ESM
import { read, update, write } from 'configorium'

๐Ÿ’ก Usage

Read/Write config couldn't be easier with Configorium! See the examples below:

.conf:

db.username=db username
db.password=db pass
db.enabled=true

Update config:

update({ 'db.enabled': true })

Push to an array:

update({ 'modules[]': 'test' })

Read/Write config:

const config = read()
config.enabled = false
write(config)

User Config:

It is common to keep config in the user's home directory (MacOS: /Users/{name}, Linux: /home/{name}, Windows: C:\users\{name}). Use the following shortcuts for quick access:

writeUser({ token: 123 }, '.zoorc') // Will be saved in {home}/.zoorc

const conf = readUser('.zoorc') // { token: 123 }

๐Ÿ”„ Unflatten

Configorium uses flat to automatically flat/unflat when writing and reading rcfile. It allows you to define nested objects using . keys. For example:

  • hello.world = true <=> { hello: { world: true }
  • test.0 = A <=> tags: [ 'A' ]

Note: If you want to disable this feature for keys that can override, pass the flat: true option.

๐ŸŒŸ Native Values

Configorium uses nyxjason to convert values into native JavaScript values. Reading count=123 results in { count: 123 } (instead of { count: "123" }). To preserve strings as is, you can use quotes like count="123".

๐Ÿš€ Exports

const defaults: RCOptions
function parse(contents: string, options?: RCOptions): RC
function parseFile(path: string, options?: RCOptions): RC
function read(options?: RCOptions | string): RC
function readUser(options?: RCOptions | string): RC
function serialize(config: RC): string
function write(config: RC, options?: RCOptions | string): void
function writeUser(config: RC, options?: RCOptions | string): void
function update(config: RC, options?: RCOptions | string): RC
function updateUser(config: RC, options?: RCOptions | string): RC

Types:

type RC = Record<string, any>
interface RCOptions {
   name?: string
   dir?: string
   flat?: boolean
}

Defaults:

{
  name: '.conf',
  dir: process.cwd(),
  flat: false
}

Why Configorium?

Be the first one to guess ๐Ÿ‡

๐Ÿ“œ License

MIT ๐Ÿ’ž