Socket
Book a DemoInstallSign in
Socket

peer-compatible

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peer-compatible

Find versions of a package that work with given peer dependencies

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

peer-compatible

Find versions of a package that work with given peer dependencies

build status AppVeyor build status code coverage

npm package license

Installation

npm install --save peer-compatible

Usage

const compatible = require('peer-compatible').default;

API

index

Finds versions of pkgName that work with given peers. Given extra peers that the package does not require at all are considered to be compatible.

Parameters

  • pkgName string The package to search for.
  • peers {} The peers that found versions need to be compatible with, formatted like a regular peer dependency object literal. Versions must be exact, ranges are not supported.

Examples

peerCompatible('some-component-lib', { 'some-framework-core-lib': '1.0.0' })
  .then(versions => console.log(versions));

Returns Promise<Array<string>> The versions of the package that work with given peers.

Keywords

compatible

FAQs

Package last updated on 11 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts