Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

comparing-dependencies

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comparing-dependencies

This library outputs the comparison results of depending libraries as a CSV file.

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

comparing-dependencies

This is a npm library that imports multiple package.json files and outputs the comparison results of depending libraries as a CSV file.

libraryprj_01prj_02prj_03
dayjs^1.10.3^1.10.2
moment^2.29.1
react^17.0.2^17.0.2
react-redux^7.2.4
webpack^5.51.1^5.47.1^4.46.0

How to use

$ yarn add comparing-dependencies

API

createCsv(packageJsons: PackageJson[]): string

Note: PackageJson type is declared in type-fest.

Usage

import { createCsv } from 'comparing-dependencies'

const csv = createCsv([
  {
    name: 'proj_01',
    dependencies: {
      react: '^17.0.2',
      dayjs: '^1.10.3',
      webpack: '^5.51.1',
    },
  },
  {
    name: 'proj_02',
    dependencies: {
      react: '^17.0.2',
      dayjs: '^1.10.2',
      react-redux: '^7.2.4',
      webpack: '^5.47.1',
    },
  },
  {
    name: 'proj_03',
    dependencies: {
      moment: '^2.29.1',
      webpack: '^4.46.0',
    },
  },
])

console.log(csv)
// library,proj_01,proj_02,proj_03
// dayjs,^1.10,3,,
// moment,,,^2.29.1
// react,^17.0.2,^17.0.2,
// react-redux,,^7.2.4,
// webpack,^5.51.1,^5.47.1,^4.46.0

Examples

FAQs

Package last updated on 22 Sep 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc