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

license-checker

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

license-checker

Check license info for a pacakge


Version published
Weekly downloads
467K
increased by7.81%
Maintainers
1
Weekly downloads
 
Created

What is license-checker?

The license-checker npm package is a tool that helps you manage and audit the licenses of the dependencies in your project. It provides detailed information about the licenses of all the packages in your node_modules directory, helping you ensure compliance with open-source license requirements.

What are license-checker's main functionalities?

List all licenses

This feature allows you to list all the licenses of the dependencies in your project. The code sample initializes the license-checker and prints out the licenses of all the packages found in the specified project directory.

const licenseChecker = require('license-checker');

licenseChecker.init({
  start: '/path/to/your/project'
}, function(err, packages) {
  if (err) {
    console.log(err);
  } else {
    console.log(packages);
  }
});

Filter by specific licenses

This feature allows you to filter the dependencies by specific licenses. The code sample initializes the license-checker and filters the packages to only include those with MIT or ISC licenses.

const licenseChecker = require('license-checker');

licenseChecker.init({
  start: '/path/to/your/project',
  onlyAllow: 'MIT;ISC'
}, function(err, packages) {
  if (err) {
    console.log(err);
  } else {
    console.log(packages);
  }
});

Custom format output

This feature allows you to customize the output format of the license information. The code sample initializes the license-checker and specifies a custom format for the output, including the name, version, licenses, and repository of each package.

const licenseChecker = require('license-checker');

licenseChecker.init({
  start: '/path/to/your/project',
  customFormat: {
    name: '',
    version: '',
    licenses: '',
    repository: ''
  }
}, function(err, packages) {
  if (err) {
    console.log(err);
  } else {
    console.log(packages);
  }
});

Other packages similar to license-checker

Keywords

FAQs

Package last updated on 28 Aug 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

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