xml-naming
npmv0.3.0TypeScriptValidates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1
Safe to adopt
Yes — xml-naming scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 70 days ago. 3 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 70 days ago. 3 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 31 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding xml-naming to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=16.0.0
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the xml-naming README.
import { name, ncName, qName, nmToken, nmTokens } from 'xml-naming';
// Name — colon allowed anywhere, used for DOCTYPE entity names
name('foo') // true
name('a:b:c') // true ← multiple colons fine for Name
name('1foo') // false ← digit start invalid
// NCName — no colon, used for SVG id attributes, namespace prefixes
ncName('my-id') // true
ncName('xlink:href') // false ← colon not allowed
// QName — exactly one colon as prefix separator, used for element/attribute names
qName('svg:circle') // true
qName('foo') // true ← unprefixed QName is validxml-naming vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| xml-namingthis page | 0 | 2 | MIT | 2 months ago |
| @nodable/entities | 0 | 2 | MIT | 1 day ago |
| xml-name-validator | 0 | 2 | Apache-2.0 | 1 day ago |
| fast-xml-builder | 0 | 1 | MIT | 1 day ago |
| fast-xml-parser | 0 | 4 | MIT | 1 day ago |
| fast-glob | 135.1M | 8 | MIT | 1 day ago |
Dependencies
Declared by xml-naming v0.3.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (1)
Used by
Popular packages that depend on xml-naming.
Relationship graph
Dependencies (left) and dependents (right) of xml-naming.
Frequently installed together
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
Entity parser for XML, HTML, External entites with security and NCR control
TypeScript definitions for node
Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
Parse String to Number based on configuration
Build XML from JSON without C/C++ based libraries
Zero-dependency, DOM-free, pure predicate for detecting unsafe strings across HTML, XML, SVG, SQL, SHELL, and REGEX contexts
Validate XML, Parse XML, Build XML without C/C++ based libraries
Release history
3 releases in the last two years, typically about 54 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.3.0latest | 2 months ago | 31 KB | MIT |
| 0.2.0 | 2 months ago | 24 KB | MIT |
| 0.1.0 | 4 months ago | 18 KB | MIT |
Overview
xml-naming is an npm package that validates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1. It has 2 known dependents in the graph. The latest version is 0.3.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need validates XML name productions — Name, NCName, QName, NMToken, NMTokens — for XML 1.0 and 1.1 and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use xml-naming?
Yes — xml-naming scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 70 days ago. 3 releases in the last 2 years.
How do I install xml-naming?
Run `npm install xml-naming` to add xml-naming to your npm project.
What license is xml-naming released under?
xml-naming is distributed under the MIT license.
How popular is xml-naming?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on xml-naming.
Is xml-naming still maintained?
The most recent release of xml-naming (v0.3.0) was published 2 months ago.
Does xml-naming run install scripts?
No. xml-naming does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.