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

updatetools

v0.3.7

Published

Update the data for mongodb database of Cryptocurrency

Readme

% updateTools This library is designed to Read & Write Crypto Currency historical data to and from a Mongo Database

The DB functions often call the cbxQuery library that I created to read the data from the coinbase api located at:

"https://api.exchange.coinbase.com/products/";

The functions that are at the heart of this libary are:

  • DBcollectionList- is used to get a list of collections from the mongo database.
  • DBproductExist- is a simple check to see if a specific product exists in the mongo database.
  • DBmostRecentDate- looks to see when the last update was run by finding the most recent data for a specific collection.
  • DBfillBlanks- when the Coinbase server was down for maintenance or in the early years when volume was not high enough to have an entry every hour, there are missing spots in the data. This code will create records with zero volume and the Last recorded price. This makes analysis more consistant especially for earlier data.
  • DBpatchBlanks- Sometimes blank spaces are due to download errors, this routine tries to re-read the data to fill in missing points
  • DBrecordCount- Count how many records are in collection
  • DBupdateCollection- Update the collection for a single collection
  • DBupdateCollections- get the list of all collections and up date each one of them.
  • DBupdateSet- This function actually write the data to the server
  • DBpatchCollection- patch all missing data for a collection

To use this library, I created a mongodb Atlas server and change the definition of MONGODB_URI to use the address given by doing the following:

Open Atlas database in MongoDB Compass

Click on the 3 dots on the database line

Choose "Copy Connection String

Paste the string as a replacement for: "mongodb//user:password@hosturl/databasename"

I named the Database: Coinbase And created empty collections with names such as:

  • ADA-USD
  • BTC-USD
  • ETH-USD

When there is an empty collection, running DBupdateCollection passing the new collection name or DBupdateCollections will start to fill the data for the new collection.

This library is used by cryptoUpdate code set. For information on cryptoUpdate see:

Maintenance

When making modifications to this code make sure to do the following:

  1. Make modifications and test locally using /testing/testuTools.js
  2. Update Version number int package.json file
  3. Update github by clicking the source control button in VSC and Providing a short description of changes and then pressing the commit button
  4. Update NPM by doing the following: a) In terminal run this command: npm publish b) It wll ask you to authenticate the npm account in the browser. c) Press enter key d) You will be taken to the browser and asked for authenticator code for npm e) Provide the authenticator code
  5. You will need to Update the code CryptoUpdate to use this new code and then update the code on the server