0.1.0 • Published 2 years ago

username-checker v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Username Checker

The Username Checker allows you to check the availability of a username across multiple websites.

Installation

npm install username-checker --save

Usage

To use the Username Checker, you first need to import the package.

import { UsernameChecker } from 'username-checker';

OR

const { UsernameChecker } = require('username-checker');

Create an instance of the UsernameChecker class and then use the isAvailable method to check the availability of a username on a specific website:

const usernameChecker = new UsernameChecker();
const result = usernameChecker.isAvailable('twitter', 'my-desired-username');
console.log(result); // { service: 'twitter', url: 'https://github.com/my-desired-username', available: true }

The isAvailable method takes two arguments - the website name (as a string) and the username to check (also a string). The method returns a Promise that resolves to an object containing information about the availability of the username on the specified website. The object has the following properties:

  • service - the name of the website checked.
  • url - the URL used to check the username.
  • available - a boolean value indicating whether the username is available on the website. This could also be undefined in case there was no deterministic way to deduce the availability.
  • reason - A potential reason of what could have gone wrong that resulted in available = undefined.

The getServices method returns an array of supported website names:

const services = usernameChecker.getServices();
console.log(services); // ['github', 'twitter', 'instagram', ... ]

Supported Websites

WebsiteName Used in isAvailable Method
Aboutabout
Ask.fmaskfm
Bandcampbandcamp
BasecampHQbasecamphq
Behancebehance
Bitbucketbitbucket
Blogspotblogspot
BuzzFeedbuzzfeed
Cashcash
Codecademycodecademy
Contentlycontently
Dailymotiondailymotion
Designspirationdesignspiration
DeviantArtdeviantart
Disqusdisqus
Dribbbledribbble
eBayebay
Etsyetsy
EyeEmeyeem
Facebookfacebook
Fanpopfanpop
Fiverrfiverr
Flickrflickr
Flipboardflipboard
GitHubgithub
Gitlabgitlab
Gravatargravatar
Houzzhouzz
Hubpageshubpages
IFTTTifttt
Instructablesinstructables
Kano Worldkanoworld
Keybasekeybase
Kikkik
Kongregatekongregate
Last.fmlast
LiveJournallivejournal
Mediummedium
Mixmix
Shopifymyshopify
Myspacemyspace
Newgroundsnewgrounds
Pandorapandora
Pastebinpastebin
Patreonpatreon
PayPalpaypal
Photobucketphotobucket
Pinterestpinterest
Product Huntproducthunt
Redditreddit
ReverbNationreverbnation
Robloxroblox
Slackslack
Slideshareslideshare
Soundcloudsoundcloud
Spotifyspotify
Steam Communitysteamcommunity
Telegramtelegram
TikToktiktok
Trakt.tvtrakt
TripIttripit
Tumblrtumblr
Twitchtwitch
Twittertwitter
Venmovenmo
Vimeovimeo
VKvk
Wattpadwattpad
Wikiawikia
WordPresswordpress
Y Combinatorycombinator
Yelpyelp
YouNowyounow
YouTubeyoutube