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

fireface

v1.0.5

Published

A convenient interface for Firebase

Downloads

12

Readme

Fireface

licence mit

A convenient interface for Firebase developers.

Purpose

Firebase is an excellent tool to have in the developer's kit, and while its standard interface is robust, it can be helpful to have some simple abstractions for common patterns, such as fetching data one time, setting and updating records, and performing queries against your database.

Fireface is designed to work with your Node.js server, and is configured using a service account, meaning your API doesn't need any special rules to access your Firebase database. Note that this also means Fireface and read, write, and delete any data, so you'll need to manage your own access control logic on your server.

Warning: don't use this library in a client-side web application. It's too exploitable.

Installation

Install as a local dependency:

npm install -S fireface

Setup

Fireface requires you to set up a Firebase project and a service account. When setting up your service account, make sure to download the credentials as a JSON file.

Once your project and account are set up, put your credentials JSON into your project, for example config/firebase/credentials.json. It's recommended that you add this file to your .gitignore, since this file contains sensitive account information. If you need per-environment configuration, Marshall can help.

Usage

const ff = require('fireface');

// Initialize Fireface/Firebase
ff.initializeApp({
  serviceAccount: path.join(__dirname, '../config/firebase/credentials.json'),
  databaseURL: 'https://my-firebase-database.firebaseio.com',
});

// Get a ref
ff.get('users/1234')
.then(user => {
  console.log(user);
});

// Create a ref
// WARNING: this will overwrite the entire ref.
ff.post('users/1234', {
  name: 'bob',
  admin: true,
}).then(() => {
  console.log('user 1234 created');
}).catch(err => {
  console.log('failed to create user 1234', err);
});

// Update a ref
ff.put('users/1234', {
  name: 'bobby',
}).then(() => {
  console.log('user 1234 updated');
}).catch(err => {
  console.log('failed to update user 1234', err);
});

// Delete a ref
ff.delete('users/1234').then(() => {
  console.log('user 1234 deleted');
});

// Get a new unique ID for a ref
const newUserId = ff.getKey('users');
// Create a user with the new ID
ff.post(`users/${newUserId}`, {
  id: newUserId,
  name: 'mary',
  admin: false,
}).then(() => {
  console.log('created new user');
});

// Perform a query on a ref
ff.find('users', { name: 'mary' })
.then(result => {
  console.log('found', result);
});

// Update multiple refs at one time
ff.update({
  'users/1234': { admin: false },
  `users/${newUserId}`: { admin: true },
}).then(() => {
  console.log('updated multiple users');
});

Versioning

To keep better organization of releases this project follows the Semantic Versioning 2.0.0 guidelines.

Contributing

Want to contribute? Follow these recommendations.

License

MIT License © Justin Sisley