twitter-validate

1.0.8 • Public • Published

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

Name Type Description
handle string The Twitter handle to validate against Twitter specification
returns boolean Whether handle is valid
validate(handle);
Name Type Description
handle string The Twitter handle to check existence of
handleExists boolean Whether 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
});

Readme

Keywords

Package Sidebar

Install

npm i twitter-validate

Weekly Downloads

1

Version

1.0.8

License

none

Last publish

Collaborators

  • benderham
  • sphvn