New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dowell03

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

dowell03

## Version 1.0.0

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

DoWell Opensource-License-Compatibility

Version 1.0.0

Description

  • The Opensource License Compatibility Check package establish how two licenses are compatible with each other. This is a percentage estimate of how likely it is to recommend use of two softwares under the two licenses in one project.

  • To check how two license are compatible with each other, you are require to provide the first license name and the second license in the respective input fields and submit.

Installation

With npm:

    npm install dowell-license-compatibility

With yarn:

    yarn add dowell-license-compatibility

Usage

The license compatibility liberary require user apiKey, followed by first license name and second license name for compatibility check.

Example using function component


import { useState} from "react";
import { OpensourceLicenseCompatibility } from "dowell-licensecompatibility";

function App() {

//handle form input field state
  const [inputState, setInputState] = useState({
    first_license_name: "",
    second_license_name: "",
  });

  const checkState = (e) => {
    setChecked((prevState) => ({
      ...prevState,
      [e.target.name]: e.target.value,
    }));
  };

  const checkLicenseCompatibility = () => {
    const result = new OpensourceLicenseCompatibility().compareLicenses({
      apiKey: process.env.API_KEY,
      first_license_name: inputState.first_license_name,
      second_license_name: inputState.second_license_name,
     
    }).then(response=>{
      console.log(response)
      
    //The result is a JSON object returned with percentage_of_compatibility and other properties which gives a brief description of the licenses compared 
    });

    
    console.log(result)
  };
  return (
    <div className="App">
      <h1>Check License Compatibility</h1>
      <button onClick={checkLicenseCompatibility}>Click</button>
    </div>
  );
}

export default App;

API(conpareLicense)

compareLicenses( apiKey, first_license_name, second_license_name,)

are used to initiates comparison between two licenses.

  • -apiKey: Your API key for accessing the process module service.

License

This project is licensed under the Apache License 2.0.

Keywords

license

FAQs

Package last updated on 29 Sep 2023

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