Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-01T11:51:42.000Z (over 4 years ago)
- Last Synced: 2024-10-16T19:16:02.754Z (2 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.
[![Deno CI](https://github.com/denorg/x-name/workflows/Deno%20CI/badge.svg)](https://github.com/denorg/x-name/actions)
[![GitHub](https://img.shields.io/github/license/denorg/x-name)](https://github.com/denorg/x-name/blob/master/LICENSE)
[![Contributors](https://img.shields.io/github/contributors/denorg/x-name)](https://github.com/denorg/x-name/graphs/contributors)
[![Deno Starter](https://img.shields.io/badge/deno-starter-brightgreen)](https://denorg.github.io/starter/)
[![Made by Denorg](https://img.shields.io/badge/made%20by-denorg-0082fb)](https://github.com/denorg)
[![TypeScript](https://img.shields.io/badge/types-TypeScript-blue)](https://github.com/denorg/x-name)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](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 →