get-download-stats

0.1.0 • Public • Published

get-download-stats NPM version

Pipeline plugin for getting download stats.

Install

Install with npm:

$ npm i get-download-stats --save

Usage

var stats = require('get-download-stats');

API

.stats

Pipeline plugin used to get npm download stats for a repository starting at the specified date or all dates.

All options below may also be set on the file.data property before piping through the stream. See the example assemblefile.js for setting up middleware.

Params

  • app {Object}: Instance of an application that inherits from Templates (required for emitting events).
  • options {Object}: Options to control start date, repo, and property on the json object to use.
  • start {String|Date}: Date to start getting downloads.
  • repo {String}: Name of repository to get. If undefined, total downloads for npm will be pulled.
  • prop {String}: Property to use in the json file to store the downloads array.
  • returns {Stream}: Stream to be used in a pipeline.

Example

app.src('path/to/files/*.json')
  .pipe(stats(app, options))
  .pipe(app.dest('path/to/files'));

Related projects

  • assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
  • assemble-core: The core assemble application with no presets or defaults. All configuration is left to the… more | homepage
  • download-stats: Get and calculate npm download stats for npm modules. | homepage
  • templates: System for creating and managing template collections, and rendering templates with any node.js template engine.… more | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Brian Woodward

License

Copyright © 2016 Brian Woodward Released under the MIT license.


This file was generated by verb on January 20, 2016.

/get-download-stats/

    Package Sidebar

    Install

    npm i get-download-stats

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • doowb