@linterhub/registry
Registry provides an interface for obtaining information about `packages` from various `package managers`
Last updated 2 years ago by svoboda-rabstvo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @linterhub/registry 
SYNC missed versions from official npm registry.

@linterhub/registry travis semantic npm github

Registry provides an interface for obtaining information about packages from various package managers

Table of Contents

  • Background
  • Installation
  • Usage
  • Contribute
  • License

Background

There are a lot of package manager with different API, which each have different methods and output. This repository contains a proposal to unified API for work with of various API.

More details in doс or at the catalog page

Installation

NPM

Requirements:

npm install @linterhub/registry

GitHub

All releases and the source code are available for download at GitHub Releases.

Usage

JavaScript

Get meta-information of packageName from npm and output it to console:

const registry = require('@linterhub/registry');
const manager = registry.getManager('npm');
manager.getMeta('packageName').then((data) => {
    console.log(data);
});

Supported package managers:

API

getMeta(name, [version])

Get meta-information of package

Options:

  • name: string - package name by search
  • version: string - package version [latest by default]

Return:

  • Promise - package meta-information, which include: name, url, license and e.t.c

getDeps(name, [version])

Get dependencies for a package

Options:

  • name: string - package name by search
  • version: string - package version [latest by default]

Return:

  • Promise - objects array, where the object is one dependency.

getVersions(name)

Get all versions by package name

Options:

  • name: string - package name by search

Returns:

  • Promise- versions array

Contribute

You may contribute in several ways like requesting new features, adding tests, fixing bugs, improving documentation or examples. Please check our contributing guidelines.

License

MIT

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 1
Last Month 1
Dependencies (3)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |