/*!
 * npm-info <https://github.com/doowb/npm-info>
 *
 * Copyright (c) 2016, Brian Woodward.
 * Licensed under the MIT License.
 */

'use strict';

var npm = require('../')();
var repo = npm.repo('micromatch');
repo.downloads(function(err, downloads) {
  if (err) return console.error(err);
  console.log(downloads.length + ' days of downloads have been pulled for micromatch');
  console.log();
  repo.total(function(err, total) {
    if (err) return console.error(err);
    console.log('total:', total);
    repo.last(30, function(err, total) {
      if (err) return console.error(err);
      console.log('last 30 days:', total);
      repo.last(7, function(err, total) {
        if (err) return console.error(err);
        console.log('last 7 days:', total);
        repo.last(1, function(err, total) {
          if (err) return console.error(err);
          console.log('last day:', total);
        });
      });
    });
  });
});

@@ -146,35 +146,370 @@
 ';%0A%0A
-var npm = require('../')();
+// // default using memory store%0A// var npm = require('../')();%0A%0A// // using data store%0A// var npm = require('../')(%7B%0A//   store: require('../lib/stores/data')()%0A// %7D);%0A%0A// using firebase store%0Avar Firebase = require('firebase');%0Avar npm = require('../')(%7B%0A  store: require('../lib/stores/firebase')(new Firebase('https://assemblebot.firebaseio.com/stats'))%0A%7D);%0A
 %0Avar
@@ -1216,32 +1216,58 @@
  day:', total);%0A
+          process.exit();%0A
         %7D);%0A    

update example using firebasebase store