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

elasticfire

v1.0.3

Published

A flexibe and configurable module to connect Firebase with Elasticsearch.

Readme

elasticfire

elasticfire

Version Downloads

A flexibe and configurable module to connect Firebase with Elasticsearch.

:rocket: Features

  • Easily configure the way how the data should be taken from Firebase
  • Filter out documents
  • Include and exclude specific fields
  • Support for joins

:cloud: Installation

# Using npm
npm install --save elasticfire

# Using yarn
yarn add elasticfire

:clipboard: Example

const ElasticFire = require("elasticfire");

// Initialize the ElasticFire instance
let ef = new ElasticFire({

    // Set the Firebase configuration
    firebase: {
        apiKey: "AI...BY",
        authDomain: "em...d.firebaseapp.com",
        databaseURL: "https://em...d.firebaseio.com",
        storageBucket: "em...d.appspot.com",
        messagingSenderId: "95...36"
    }

    // Firebase paths and how to index them in Elasticsearch
  , paths: [
       {
           // Firebase path
           path : "articles"

           // Elasticsearch index and type
         , index: "articles"
         , type : "article"

           // Optional joined fields
         , joins: [
               // The `author` is a field from the article
               // which points to the `users` collection.
               {
                   path: "users"
                 , name: "author"
               }

               // If we have an array of comment ids, pointing
               // to another collection, then they will be joined too
             , {
                   path: "comments"
                 , name: "comments"
               }
           ]

           // Filter out some data
         , filter: (data, snap) => snap.key !== "_id"
       }
    ]
});

// Listen for the events emitted by
// the ElasticFire instanceand output some data
ef.on("error", err => {
    console.error(err);
}).on("index_created", name => {
    console.log(`${name} created`);
}).on("index_updated", name => {
    console.log(`${name} updated`);
}).on("index_deleted", name => {
    console.log(`${name} deleted`);
});

:question: Get Help

There are few ways to get help:

  1. Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
  2. For bug reports and feature requests, open issues. :bug:

:memo: Documentation

ElasticFire(config)

Creates a new instance of ElasticFire.

Params

  • Object config: An object containing the following fields:
    • paths (Array): An array of objects to configure the way how the data is taken from Firebase:
      • index (String): The Elasticsearch index name.

      • type (String): The Elasticsearch type name.

      • joins (Array): An array of objects configuring the joins:

        • name (String): The field which is an id pointing to another collection in Firebase.
        • path (String): The Firebase collection path where the the ids are pointing to.
      • fields (Array): An array of dot-notation strings representing the fields to include in the objects.

      • omit (Array): An array of dot-notation strings representing the fields to omit.

      • filter (Function): A function to filter the objects (if it returns false, the object is not indexed). The function receives as arguments the data object and the snapshot.

        By default, all the objects from a path are indexed.

    • firebase (Object): The Firebase configuration.
    • elasticSearch (Object): The Elasticsearch configuration:
      • host (String): The Elasticsearch host (default: localhost).
      • port (Number): The Elasticsearch port (default: 9200).
      • auth (Object): The credentials.
        • user (String): The user to be used.
        • pass (String): The password to be used.

Return

  • ElasticFire The ElasticFire instance.

search()

Triggers the search in Elasticsearch.

:yum: How to contribute

Have an idea? Found a bug? See how to contribute.

:cake: Thanks

flashlight was the main inspiration for this project. :cake:

:scroll: License

MIT © Bloggify