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

indentier

v0.3.1

Published

A silly formatter that hides braces, semicolons and commas in the right margin — letting curly-brace languages pretend they're Python or Ruby.

Readme

Indentier

npm version npm downloads CI License: MIT Node Types

A silly formatter that hides {, }, ;, and trailing , in the right margin — letting curly-brace languages pretend they're Python or Ruby.

日本語版: README-ja.md

Before / After

function sayHello(content) {
  if (!content) {
    console.log("...");
  } else if (typeof content !== "string") {
    console.log(":rage:");
  } else {
    console.log(content);
  }
}
// default mode
function sayHello(content)                                                      {
  if (!content)                                                                 {
    console.log("...")                                                          ;}
  else if (typeof content !== "string")                                         {
    console.log(":rage:")                                                       ;}
  else                                                                          {
    console.log(content)                                                        ;}}
// ruby mode
                                                                                let end=null;
function sayHello(content)                                                      {
  if (!content)                                                                 {
    console.log("...")                                                          ;}
  else if (typeof content !== "string")                                         {
    console.log(":rage:")                                                       ;}
  else                                                                          {
    console.log(content)                                                        ;}}
  end
end

Install

npm i -D indentier

Requires Node.js 22+.

Usage

npx indentier --init                    # scaffold .indentierrc.json and .indentierignore
npx indentier src/index.ts              # print to stdout
npx indentier --write "src/**/*.ts"     # format in place
npx indentier --check "src/**/*.ts"     # exit 1 if any file would change

CLI options:

-w, --write        Format files in place
-c, --check        Exit 1 if any file would change
--init             Create .indentierrc.json and .indentierignore
--mode <mode>      Override mode (default | ruby)
--offset <number>  Override the offset
--no-semi          Do not move semicolons
--no-comma         Do not move trailing commas

Modes

| Mode | What it does | |-|-| | default | Pushes every symbol to the right margin. Source semantics untouched. | | ruby | default plus a synthetic end after each closing brace; let end=null; is injected right after the first { so the file still runs. |

Configuration

Indentier is cosmiconfig-powered and auto-discovers:

  • package.json ("indentier" field)
  • .indentierrc.{json,yaml,yml,js,cjs,mjs,ts,cts,mts}
  • indentier.config.{js,cjs,mjs,ts,cts,mts}
// .indentierrc.json
{
  "mode": "default",
  "tabWidth": 2,
  "useTabs": false,
  "offset": 20,
  "minColumn": 80,
  "brackets": true,
  "semicolon": true,
  "comma": true,
  "ruby": { "variableName": "end", "injectDeclaration": true, "smartEnd": true },
  "plugins": []
}

| Key | Type | Default | Description | |-|-|-|-| | mode | "default" \| "ruby" | "default" | Formatting mode | | tabWidth | number | 2 | Indent width for normalization | | useTabs | boolean | false | Body uses tabs (right padding stays spaces) | | offset | number | 20 | Columns appended after the longest body | | minColumn | number | 80 | Minimum column for floated symbols | | brackets | boolean | true | Move { and } | | semicolon | boolean | true | Move ; | | comma | boolean | true | Move trailing , (multi-line) | | ruby.variableName | string | "end" | Synthetic terminator identifier | | ruby.injectDeclaration | boolean | true | Inject a variable declaration right after the first { | | ruby.smartEnd | boolean | true | Skip end before else / catch / finally / while | | overrides | Override[] | [] | Per-glob option overrides | | plugins | string[] | [] | Plugin package names to load (see indentier.github.io/plugins) |

.indentierignore

.gitignore-compatible globs. No paths are ignored implicitly — create the file (or run indentier --init) to exclude node_modules, build outputs, etc.

Plugins

The core package handles JavaScript, TypeScript, and the JSON family (.json, .jsonc, .json5) natively. For other languages, install a plugin:

npm i -D @indentier/plugin-rust @indentier/plugin-go
// .indentierrc.json
{
  "plugins": ["@indentier/plugin-rust", "@indentier/plugin-go"]
}

For the full list of supported languages and plugins, see indentier.github.io/plugins.

API

import { format, loadConfig } from 'indentier'

const { options } = await loadConfig()
const output = format(source, options)

CJS also works: const { format } = require('indentier').

To load plugins programmatically:

import { format, loadPlugins, getPlugin } from 'indentier'
import path from 'node:path'

await loadPlugins(['@indentier/plugin-rust'])
const plugin = getPlugin('.rs')
const output = format(source, options, '.rs', plugin)

Supported languages

JS/TS and the JSON family (.json, .jsonc, .json5) are built in. For other languages see indentier.github.io/plugins for the full list and plugin packages.

{
  "name": "demo",
  "version": "1.0.0",
  "tags": ["one", "two", "three"],
  "nested": {
    "a": 1,
    "b": 2
  }
}
                                                                                {
  "name": "demo"                                                                ,
  "version": "1.0.0"                                                            ,
  "tags": ["one", "two", "three"]                                               ,
  "nested":                                                                     {
    "a": 1                                                                      ,
    "b": 2                                                                      }}

Parsing is heuristic and regex-based — Indentier deliberately avoids ASTs to stay fast and language-agnostic.

License

MIT © otoneko. See CONTRIBUTING.md for development setup.