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

libnpmdiff

Package Overview
Dependencies
Maintainers
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libnpmdiff

The registry diff

  • 7.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
450K
decreased by-16.56%
Maintainers
6
Weekly downloads
 
Created

What is libnpmdiff?

The libnpmdiff package is a tool for comparing different versions of npm packages. It helps developers understand the changes between versions by providing a detailed diff of the package contents.

What are libnpmdiff's main functionalities?

Compare two versions of a package

This feature allows you to compare two specific versions of a package. The code sample demonstrates how to use libnpmdiff to compare version 1.0.0 and version 2.0.0 of a package named 'package-name'.

const libnpmdiff = require('libnpmdiff');

libnpmdiff('package-name@1.0.0', 'package-name@2.0.0').then(diff => {
  console.log(diff);
}).catch(err => {
  console.error(err);
});

Compare local package with a published version

This feature allows you to compare your local package with the latest published version. The code sample shows how to compare the current local package (denoted by '.') with the latest version of 'package-name'.

const libnpmdiff = require('libnpmdiff');

libnpmdiff('.', 'package-name@latest').then(diff => {
  console.log(diff);
}).catch(err => {
  console.error(err);
});

Output diff in different formats

This feature allows you to output the diff in different formats such as JSON. The code sample demonstrates how to get the diff in JSON format for two versions of 'package-name'.

const libnpmdiff = require('libnpmdiff');

libnpmdiff('package-name@1.0.0', 'package-name@2.0.0', { format: 'json' }).then(diff => {
  console.log(JSON.stringify(diff, null, 2));
}).catch(err => {
  console.error(err);
});

Other packages similar to libnpmdiff

Keywords

FAQs

Package last updated on 03 Oct 2024

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