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 🙏

© 2025 – Pkg Stats / Ryan Hefner

readmyconfig

v1.0.1

Published

A simple JavaScript library to read Node.js project configuration files synchronously without requiring await.

Readme

readmyconfig

A simple JavaScript library to read Node.js project configuration files synchronously without requiring await.

npm version Downloads License: MIT Node.js Version

Installation

npm install readmyconfig

Usage

import Konf from 'readmyconfig';

// Read package.json
const pkg = Konf.package();
console.log(pkg.name, pkg.version);

// Read tsconfig.json
const tsconfig = Konf.tsconfig();
console.log(tsconfig.compilerOptions?.target);

// Read vite config
const vite = Konf.vite();
console.log(vite); // Raw content for JS/TS files

// Read ESLint config
const eslint = Konf.eslint();
console.log(eslint);

// Read Prettier config
const prettier = Konf.prettier();
console.log(prettier);

// Check what configs are available
console.log(Konf.list());

// Check if a specific config exists
if (Konf.has('package')) {
  console.log('package.json found');
}

// Get any config by name
const customConfig = Konf.get('webpack');

Supported Configuration Files

  • package.json
  • tsconfig.json
  • vite.config.js / vite.config.ts
  • .eslintrc.json / .eslintrc.js / eslint.config.js
  • .prettierrc / .prettierrc.json / prettier.config.js
  • webpack.config.js
  • rollup.config.js
  • .babelrc / babel.config.json
  • jest.config.js
  • vitest.config.ts
  • tailwind.config.js
  • postcss.config.js
  • next.config.js
  • nuxt.config.js

API

Methods

  • Konf.package() - Returns package.json content
  • Konf.tsconfig() - Returns tsconfig.json content
  • Konf.vite() - Returns vite config content
  • Konf.eslint() - Returns ESLint config content
  • Konf.prettier() - Returns Prettier config content
  • Konf.webpack() - Returns webpack config content
  • Konf.rollup() - Returns rollup config content
  • Konf.babel() - Returns babel config content
  • Konf.jest() - Returns jest config content
  • Konf.vitest() - Returns vitest config content
  • Konf.tailwind() - Returns tailwind config content
  • Konf.postcss() - Returns postcss config content
  • Konf.next() - Returns next.js config content
  • Konf.nuxt() - Returns nuxt.js config content
  • Konf.get(name) - Returns config by name
  • Konf.has(name) - Checks if config exists
  • Konf.list() - Returns array of available config names

Features

  • Synchronous reading (no await needed)
  • Automatic file detection in current and parent directories
  • JSON parsing for .json files
  • Raw content for .js/.ts files
  • Graceful handling of missing files
  • ESM support

Requirements

  • Node.js 14.0.0 or higher
  • ESM support

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support


Made with ❤️ by Puparia