Skip to content

tunnckoCore/npm-pkgs-count

Repository files navigation

npm mit license build status coverage status deps status

Count npm user packages from npmjs.com website profile. API and CLI.

Install

npm i --save npm-pkgs-count
npm test
npm-pkgs-count --help

API

For more use-cases see the tests

Count packages of the given npmjs.com user

  • <username> {String} non emptry string, npm username
  • <callback> {Function} node-style callback (err, res)

Example

var npmPkgsCount = require('npm-pkgs-count');

npmPkgsCount('tunnckocore', function _cb(err, cnt) {
  if (err) {
    console.error(err);
    return;
  }
  console.log(cnt);
  //=> 96

  console.log(typeof cnt);
  //=> number
});

CLI

run npm-pkgs-count --help or try this one

npm i -g npm-pkgs-count

npm-pkgs-count tunnckocore

  Aloha, master!

  ℹ Please wait a moment...
  ℹ We fetching data from https://www.npmjs.com

  ✔ 96 packages by tunnckocore

Related

  • npm-related: Thin wrapper on top of helper-related for generating a list of links to the homepages of related NPM projects.
  • npm-pkgs: List user npm packages from the npmjs.com!
  • npm-pkgs-cli: CLI for listing and filtering user npm packages from the npmjs.com! Using tunnckoCore/npm-pkgs-filter
  • npm-pkgs-filter: Filter the list of user npm packages from the npmjs.com using glob pattern, function, array or regex.
  • is-missing: Check that given name or user/repo exists in npm registry or in github as organization/user repository.
  • online-branch-exist: Check that given branch/tag/release exist in github repo, using user/repo#branch pattern.

Author

Charlike Mike Reagent

License MIT license

Copyright (c) 2015 Charlike Mike Reagent, contributors.
Released under the MIT license.


Proudly generated by docks(1), April 18, 2015