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

@dxpert/uns-naming-check

v0.1.1

Published

Check a set of Unified Namespace (UNS) topic paths for depth, casing, and collision problems - browser module, CLI, and demo page.

Readme

uns-naming-check

Checks a set of Unified Namespace (UNS) topic paths for the problems that quietly rot a namespace over time. It exists because a UNS is only as useful as its naming discipline, and drift (mixed casing, inconsistent depth, near-duplicate siblings) is hard to spot by eye once a namespace has hundreds of topics.

What it checks

  • Inconsistent depth across paths (e.g. some paths at 4 levels, others at 5)
  • Mixed casing styles across segments (kebab-case, snake_case, camelCase, PascalCase, UPPER, lower, mixed)
  • Whitespace inside a segment
  • Case-collisions between siblings at any level (Line-1 vs line-1 read as one namespace node in most brokers, but are two distinct topics under case-sensitive MQTT)
  • Duplicate full paths
  • Stray MQTT wildcards (+, #) inside a stored path

Usage

Browser

Open demo/index.html directly in a browser (no server or build step needed — it's a plain ES module import). Paste topic paths, one per line, and click "Check namespace".

As a module

import { checkNamespace, checkNamespaceText } from '@dxpert/uns-naming-check';

const findings = checkNamespace([
  'Acme/Montreal/Stamping/Line-1/Press-01',
  'acme/montreal/stamping/line-1/press-02',
]);

// or, from raw multi-line text:
const findings2 = checkNamespaceText('Acme/Montreal/Line-1\nAcme/Montreal/Line-1');

Each finding is { kind: 'fail' | 'warn' | 'pass' | 'info', label, message }. message may contain simple <code>...</code> markup; strip it with the exported plainText() helper for plain-text output.

CLI

node bin/cli.js "Acme/Montreal/Line-1/Press-01" "acme/montreal/line-1/press-01"
node bin/cli.js --file paths.txt
cat paths.txt | node bin/cli.js --json

No dependencies to install. Exit code is non-zero if any check finds an error.

Examples

$ node bin/cli.js --file paths.txt
[ISSUES] 7 path(s) checked - 2 error(s), 2 warning(s).
[WARN] Duplicate path: Acme/Montreal/Stamping/Line-1/Press-01 appears more than once.
[ERROR] Case-collision: Acme/Montreal/Assembly/Line-4/Robot-Cell-02 vs acme/montreal/assembly/line-4/robot-cell-02. MQTT topics are case-sensitive - these read as one namespace but are two.
[WARN] Line 5 Acme/Toronto/Packaging/Line 2/Palletizer-01: segment Line 2 contains whitespace - prefer - or _.
[WARN] Inconsistent depth: 6 path(s) at 5 levels, 1 path(s) at 3 levels. A UNS aligned to ISA-95 usually keeps one consistent depth (e.g. Enterprise/Site/Area/Line/Unit) with clear rules for shallower nodes.
[SUMMARY] 6 unique path(s) - depth(s): 5, 3 - styles: PascalCase, lower, Title-Case
$ node bin/cli.js "Acme/Montreal/Stamping/Line-1/Press-01" "Acme/Montreal/Stamping/Line-1/Press-02"
[VALID] No issues found. 2 path(s), consistent depth, one naming style.
[SUMMARY] 2 unique path(s) - depth(s): 5 - styles: PascalCase

Maintained by dxpert.ai

dxpert.ai (https://dxpert.ai) builds tools and services for Industry 4.0 / digital transformation teams designing and validating industrial data layers. This checker is one of a small set of free, no-signup validators.

A free hosted version of this tool runs at dxpert.ai/tools.html — no install required.