Socket
Socket
Sign inDemoInstall

username-checker

Package Overview
Dependencies
9
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    username-checker

Check the availability of a username across multiple websites


Version published
Weekly downloads
193
increased by107.53%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.1.0 (2023-07-03)

Features

  • app: implement publicUrl in config (5c94970)
  • service: add gitlab (95efb3f)

Bug Fixes

Readme

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

Last updated on 03 Jul 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc