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

dgr

v0.0.1

Published

Data garage nodejs tool

Readme

Data Garage node tool

Nodejs tool for Data Garage usage.

Install

npm install dgr

Sample

Data

[{
    
    "Format": "48",
    "Valuie": "12.3E+3",
    "B Fmt": "##0.0E+0",
    "VBA Fmt": "123.5E+2",
    "Fmt": "##0.0E+0",
    "Macro": "12.3E+3"
}, {
    
    "Format": "49",
    "Valuie": "12345.6789",
    "B Fmt": "@",
    "VBA Fmt": "12345.6789",
    "Fmt": "@",
    "Macro": "12345.6789"
}]

Usage

Public methods

dgr_obj.all(callback)

Getting all the data from resource.

var dgr= require('..');
var dgr_obj= new dgr(<data id>)
dgr_obj.all(function(err, result) {
        if(err) {
            console.error(err)
        } else {
            dgr_obj.tableize(result);
            dgr_obj.col(1, function(err, col) {
                console.log(col)
            })
        }
})
  • Arguments

    • callback : (function)
      • error: return error message, if no error return null
      • result: return result should return a JSON

dgr_obj.custom(config, callback)

Getting customize data from resource.

var dgr= require('..');
var dgr_obj= new dgr(<data id>)
dgr_obj.custom({
        limit: 10, 
        fields: 'Format',
        skip: 2,
        selector: 'B Fmt=General'
    }, function(err, result) {
        if(err) {
            console.error(err)
        } else {
            dgr_obj.tableize(result);
            dgr_obj.col(1, function(err, col) {
                console.log(col)
            })
        }
})
  • Arguments
    • configure : (object)

      • limit: You can limit the data set you are pulling from remote, should be a number
      • fields: Select the fields you want to get, should be a string seperate by comma (for example: Format, Valuie, ...)
      • skip: You could also skip the record you don't want( for example: skip: 2, that means the data will start from the 3)
      • selector : You can also select the data using greater, lesser, or equal ( for exmaple: B Fmt=General)
    • callback : (function)

      • error: return error message, if no error return null
      • result: return result should return a JSON

After you fetch data from resource

Remind : You will have to use one of custom or all method before you use following methods.

dgr_obj.tableize(json)

see more details in https://github.com/DataGarage/node-json-table

tableize method can convert your json to table easily.

dgr_obj.row(0, callback)

  • return: Object
  • example: example.row(0, function(err, result) {})
{
    "Format": "0",
    "Valuie": "12345.6789",
    "B Fmt": "General",
    "VBA Fmt": "",
    "Fmt": "",
    "Macro": ""
}

dgr_obj.col(0, callback) or dgr_obj.col(<column_name>, callback)

  • return: Array
  • example: example.col(0, function(err, result){})
  • example2: example.col('Format', function(err, result){})
[0,1,2,3,4...]

License

MIT