Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including snoostorm with all npm packages installed. Try it out:

var snoostorm = require("snoostorm")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

snoostorm v1.5.0

A streaming client for reddit, based off of snoowrap


Event-based wrapper around snoowrap


Basic Usage:

import { InboxStream, CommentStream, SubmissionStream } from "snoostorm";
import Snoowrap from "snoowrap";

const creds = require("./credentials.json");

const client = new Snoowrap(creds);

// Options object is a Snoowrap Listing object, but with subreddit and pollTime options
const comments = new CommentStream(client, {
  subreddit: "AskReddit",
  limit: 10,
  pollTime: 2000,
comments.on("item", console.log);

const submissions = new SubmissionStream(client, {
  subreddit: "AskReddit",
  limit: 10,
  pollTime: 2000,
submissions.on("item", console.log);

const inbox = new InboxStream(client);
inbox.on("item", console.log);

inbox.on("end", () => console.log("And now my watch has ended"));

Custom Polls

Out of the box, snoostorm supports the following objects:

  • Comments
  • Submissions
  • Inbox
  • Modmail

If you would like to poll another object in snoowrap, you can implement your own Poll easily. For example, here is an implementation that will poll for new friends:

import { Poll } from "snoostorm"

export interface FriendStreamOptions {
  pollTime?: number;

export class FriendStream extends Poll<Snoowrap.RedditUser> {
    client: Snoowrap,
    options: FriendStreamOptions = { pollTime: 2000 }
  ) {
      frequency: options.pollTime,
      get: () => client.getFriends(),
      identifier: "name",

const friends = new FriendStream(client);

friends.on("item", (item) => {
  console.log("New Friend!",;

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free