Last 12 weeks · 2 commits
4 of 6 standards met
only checks the fully punctuation-stripped form of a name. That catches because exists, but misses the opposite case: an existing package that is the one carrying the punctuation. is not publishable. exists, and the registry strips punctuation from both names before comparing them. How I verified the registry behaviour The moniker rules post linked in the source only says punctuation is removed from the new name, so the reverse direction is not documented anywhere. I tested it against the registry with two throwaway packages, both since unpublished: 1. Published . 2. Attempted to publish : The existing punctuated name blocked the new one, so the comparison is normalised on both sides. The change returns the name spelled with each separator (, , , ), and the conflict check now requests each variant. For a name with one separator that is 3 requests instead of 1, run concurrently, inside the branch that already made a request. Mixed-separator spellings ( against ) are still not covered: they appear vanishingly rare and covering them costs 4^n requests. The readme now documents the one direction that cannot be checked from the client: a name with no punctuation conflicting with a punctuated existing one, such as against . The registry offers no way to ask which existing names strip down to a given string. Tests Added a case pinned to , which has existed since 2015 and is downloaded millions of times a week, so it is a stable fixture. pass.
This is a feature request asking for using the same library that npm internally uses, and checking against the npm package database, to see if it triggers "too similar to existing package". Otherwise npm-name/npm-name-cli works the same as . And I wasn't trying to register something similar to node on purpose, I just think noxe is a fantastic name for a vpl, I ended up calling my package yutani. And if this is too much work, then add a note to the readme that this works as well as npm info package, as in it does not do any string proximity checks. Thanks.
Repository: sindresorhus/npm-name. Description: Check whether a package or organization name is available on npm Stars: 176, Forks: 28. Primary language: JavaScript. Languages: JavaScript (94.5%), TypeScript (5.5%). License: MIT. Latest release: v8.1.1 (1w ago). Open PRs: 0, open issues: 0. Last activity: 1w ago. Community health: 71%. Top contributors: sindresorhus, kevva, BendingBender, mikehardy, sidoshi, astur, bconnorwhite, one19, itaisteinherz, springcomp and others.