linterhub / registry

Registry provides an interface for obtaining information about packages from various package managers
MIT License
1 stars 3 forks source link
api composer gem json npm package package-manager pip registry

@linterhub/registry travis semantic npm github

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

Table of Contents

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 = new Registry(RegistryCollection.npm);
registry.get(Request.Meta, {
    name: "packageName"
})
.then((result) => {
    console.log(result.data);
});

Supported package managers:

API

getMeta(name, [version])

Get meta-information of package

Options:

Return:

getDeps(name, [version])

Get dependencies for a package

Options:

Return:

getVersions(name)

Get all versions by package name

Options:

Returns:

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