npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

resource-twitter

v0.4.2

Published

for interacting with the Twitter API

Downloads

7

Readme

twitter

for interacting with the Twitter API

API

properties

methods

properties

for interacting with the Twitter API

  • id

    • type : any
  • credentials

    • description : credentials for logging into twitter

    • properties

      • type : object

      • consumer_key

        • type : string

        • required : true

      • consumer_secret

        • type : string

        • required : true

      • access_token_key

        • type : string

        • required : true

      • access_token_secret

        • type : string

        • required : true

  • user

    • description : a twitter user

    • properties

      • id

        • required : false
      • screenName

        • type : string

        • required : false

  • tweet

    • description : a twitter tweet

    • type : object

    • properties

      • message

        • type : string

        • required : true

  • stream

    • description : a twitter stream

    • properties

      • method

        • type : string

        • required : true

      • follow

        • type : string

        • required : false

      • track

        • type : string

        • required : false

      • locations

        • type : string

        • required : false

methods

twitter.connect(options, callback)

connects to twitter

  • options

    • description : credentials for logging into twitter

    • properties

      • type : object

      • consumer_key

        • type : string

        • required : true

      • consumer_secret

        • type : string

        • required : true

      • access_token_key

        • type : string

        • required : true

      • access_token_secret

        • type : string

        • required : true

  • callback

    • type : function

    • default : function () {}

twitter.disconnect(options, callback)

disconnects from twitter

  • options

    • type : object

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

  • callback

    • type : function

    • default : function () {}

twitter.addStream(options, callback)

starts listening to a twitter stream

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • stream

        • description : a twitter stream

        • properties

          • method

            • type : string

            • required : true

          • follow

            • type : string

            • required : false

          • track

            • type : string

            • required : false

          • locations

            • type : string

            • required : false

  • callback

    • type : function

    • default : function (error, options, stream) {}

twitter.getStream(options, callback)

gets an active twitter stream

  • options

    • type : object

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • streamId

        • type : string
  • callback

    • type : function

twitter.removeStream(object, callback)

stops listening to a twitter stream

  • object

    • type : object

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • streamId

        • type : string
  • callback

    • type : function

    • default : function (error, options) {}

twitter.limit(options, callback)

collects rate limiting events from twitter

  • options

    • type : object
  • callback

    • type : function

    • default : function () {}

twitter.error(error, callback)

collects error events from twitter

  • error

  • callback

    • type : function

    • default : function () {}

twitter.send(options, callback)

sends a tweet (updates your status)

  • options

    • type : object

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • message

        • type : string

        • required : true

  • callback

    • default : function () { resource.logger.info('sent tweet: '); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.info(i + ': ' + arg); }); }

twitter.receive(options, callback)

receives tweets from activated streams

  • options

    • description : a twitter tweet

    • type : object

    • properties

      • message

        • type : string

        • required : true

  • callback

    • default : function () { resource.logger.info('received tweet: '); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.info(i + ': ' + arg); }); }

twitter.follow(options, callback)

follows a twitter user

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • screenName

        • type : string

        • required : false

      • id

        • required : false
  • callback

    • type : function

    • default : function () { resource.logger.info('followed: '); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.info(i + ': ' + arg); }); }

twitter.unfollow(options, callback)

unfollows a twitter user

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • screenName

        • type : string

        • required : false

      • id

        • required : false
  • callback

    • type : function

    • default : function () { resource.logger.info('unfollowed: '); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.info(i + ': ' + arg); }); }

twitter.block(options, callback)

blocks a twitter user

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • screenName

        • type : string

        • required : false

      • id

        • required : false
  • callback

    • type : function

    • default : function () { resource.logger.info('blocked: '); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.info(i + ': ' + arg); }); }

twitter.report(options, callback)

reports a twitter user

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • screenName

        • type : string

        • required : false

      • id

        • required : false
  • callback

    • type : function

    • default : function () { resource.logger.warn('reported:'); [].slice.call(arguments).forEach(function (arg, i) { resource.logger.warn(i + ': ' + arg); }); }

twitter.showUser(options, callback)

shows information on a twitter user

  • options

    • properties

      • user

        • description : a twitter user

        • properties

          • id

            • required : false
          • screenName

            • type : string

            • required : false

      • screenName

        • type : string

        • required : false

      • id

        • required : false
  • callback

    • type : function

twitter.tweetLength(options, callback)

gets the length of a tweet

  • options

    • description : a twitter tweet

    • type : object

    • properties

      • message

        • type : string

        • required : true

  • callback

    • type : function

    • required : false

dependencies

README auto-generated with docs