Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

twitter-validate

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twitter-validate

A Twitter handle validation tool. Checks whether a provided handle meets Twitter's handle criteria. Also provides a method to check whether a provided twitter handle already exists online.

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
2
Created
Source

Twitter Validate

A Twitter handle validation tool. Checks whether a provided handle meets Twitter's handle criteria. Also provides a method to check whether a provided twitter handle already exists online.

Installation

$ npm install twitter-validate

Usage

NameTypeDescription
handlestringThe Twitter handle to validate against Twitter specification
returnsbooleanWhether handle is valid
validate(handle);
NameTypeDescription
handlestringThe Twitter handle to check existence of
handleExistsbooleanWhether the handle exists on Twitter
exists(handle, function(handleExists){});

Example

var validate = require('twitter-validate').validate;
var exists = require('twitter-validate').exists;

validate("@benderham88") // boolean

exists("@benderham88", function(handleExists){
    handleExists // boolean
});

Keywords

twitter

FAQs

Package last updated on 13 Jul 2017

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