Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

username-checker

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

username-checker

Check the availability of a username across multiple websites

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 03 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc