https://github.com/denorg/x-name
🏷️ Check if a package name is available on deno.land/x
https://github.com/denorg/x-name
api deno denoland denorg json typescript
Last synced: 3 months ago
JSON representation
🏷️ Check if a package name is available on deno.land/x
- Host: GitHub
- URL: https://github.com/denorg/x-name
- Owner: denorg
- License: mit
- Created: 2020-05-14T22:48:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T11:51:42.000Z (about 5 years ago)
- Last Synced: 2024-10-16T19:16:02.754Z (9 months ago)
- Topics: api, deno, denoland, denorg, json, typescript
- Language: TypeScript
- Homepage: https://denorg.github.io/x-name/
- Size: 33.2 KB
- Stars: 5
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏷️ X Name
Check if a package name is available in the https://deno.land/x third-party Deno modules registry.
[](https://github.com/denorg/x-name/actions)
[](https://github.com/denorg/x-name/blob/master/LICENSE)
[](https://github.com/denorg/x-name/graphs/contributors)
[](https://denorg.github.io/starter/)
[](https://github.com/denorg)
[](https://github.com/denorg/x-name)
[](https://github.com/semantic-release/semantic-release)## ⭐ Getting started
Import the `checkIfNameIsAvailable` or `checkIfNameExists` function and use it:
```ts
import { checkIfNameIsAvailable, checkIfNameExists } from "https://deno.land/x/x_name/mod.ts";await checkIfNameIsAvailable("abc"); // false
await checkIfNameIsAvailable("your-package-name"); // trueawait checkIfNameExists("abc"); // true
await checkIfNameExists("your-package-name"); // false
```### CLI with [DPX](https://github.com/denorg/dpx)
After [installing DPX](https://github.com/denorg/dpx), you can directly use the CLI using the `dpx` command:
```bash
dpx x_name available --allow-net
# truedpx x_name exists --allow-net
# false
```### CLI
Alternatively, you can use it directly from the CLI by using `deno run`:
```bash
deno run --allow-net https://deno.land/x/x_name/cli.ts available
deno run --allow-net https://deno.land/x/x_name/cli.ts exists
```You can also install it globally using the following:
```bash
deno install --allow-net -n x_name https://deno.land/x/x_name/cli.ts
```Then, the package is available to run:
```bash
x_name available
x_name exists
```### Configuration
Required permissions:
1. `--allow-net`
## 👩💻 Development
Run tests:
```bash
deno test --allow-net
```## 📄 License
MIT © [Denorg](https://den.org.in)
A project by Denorg, the world's first Deno-focused community
organization and consulting company. Work with us →