{"_id":"@dowelllabs/dowell-licensecompatibility","name":"@dowelllabs/dowell-licensecompatibility","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dowelllabs/dowell-licensecompatibility","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.","main":"dist/index.js","module":"dist/index.es.js","jsnext:main":"dist/index.es.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"rollup -c"},"keywords":["license","compatibility","check","dowell","api"],"author":{"name":"Dowell UX Living Lab"},"license":"Apache License 2.0","peerDependencies":{"react":"^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0","react-dom":"^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"},"devDependencies":{"@babel/cli":"^7.22.9","@babel/core":"^7.22.9","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/preset-env":"^7.22.9","@babel/preset-react":"^7.22.5","@rollup/plugin-commonjs":"^25.0.4","@rollup/plugin-node-resolve":"^15.1.0","babel-loader":"^9.1.3","rollup":"^2.79.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-peer-deps-external":"^2.2.4","webpack-cli":"^5.1.4"},"gitHead":"f90bbecc2ac20af14e3c1ed652e5a1386c361d1d","_id":"@dowelllabs/dowell-licensecompatibility@1.0.0","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-sdCK/AE3dT2zpVIlvHBmLjBgSQCLA/lyZzqhKt+t/vyWSX0e1wtLgujBOYVzfePYxbAQopboPPQa5KBxtU5bEQ==","shasum":"833d97373dad59ed67e05f7f07174f27fa1db23e","tarball":"https://registry.npmjs.org/@dowelllabs/dowell-licensecompatibility/-/dowell-licensecompatibility-1.0.0.tgz","fileCount":8,"unpackedSize":20380,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAHqbVvQEM18WoppBr55s17wl6HEMDk3N1iNWipX1l5VAiEA/mGsWXC7j0a8ENHXA0PewLIEYH9EtEjVZ7S+5+qaieg="}]},"_npmUser":{"name":"dowelllabs","email":"thomas@dowellresearch.sg"},"directories":{},"maintainers":[{"name":"dowelllabs","email":"thomas@dowellresearch.sg"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dowell-licensecompatibility_1.0.0_1694186148962_0.003906320329493118"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-08T15:15:48.834Z","1.0.0":"2023-09-08T15:15:49.144Z","modified":"2023-09-08T15:15:49.505Z"},"maintainers":[{"name":"dowelllabs","email":"thomas@dowellresearch.sg"}],"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.","keywords":["license","compatibility","check","dowell","api"],"author":{"name":"Dowell UX Living Lab"},"license":"Apache License 2.0","readme":"# DoWell Opensource-License-Compatibility\r\n\r\n## Version 1.0.0\r\n\r\n### Description\r\n\r\n- 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.\r\n\r\n- 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.\r\n\r\n### Installation\r\n\r\nWith npm:\r\n\r\n```javascript\r\n    npm install @dowelllabs/dowell-license-compatibility\r\n```\r\nWith yarn:\r\n\r\n```javascript\r\n    yarn add @dowelllabs/dowell-license-compatibility\r\n```\r\n\r\n\r\n## Usage\r\n\r\nThe license compatibility liberary require user ```apiKey```, followed by ```first license name``` and  ```second license name``` for compatibility check. \r\n\r\n### Example using function component\r\n\r\n```javascript\r\n\r\nimport { useState} from \"react\";\r\nimport { OpensourceLicenseCompatibility } from \"@dowelllabs/dowell-licensecompatibility\";\r\n\r\nfunction App() {\r\n\r\n//handle form input field state\r\n  const [inputState, setInputState] = useState({\r\n    first_license_name: \"\",\r\n    second_license_name: \"\",\r\n  });\r\n\r\n  const checkState = (e) => {\r\n    setChecked((prevState) => ({\r\n      ...prevState,\r\n      [e.target.name]: e.target.value,\r\n    }));\r\n  };\r\n\r\n  const checkLicenseCompatibility = () => {\r\n    const result = new OpensourceLicenseCompatibility().compareLicenses({\r\n      apiKey: process.env.API_KEY,\r\n      first_license_name: inputState.first_license_name,\r\n      second_license_name: inputState.second_license_name,\r\n     \r\n    }).then(response=>{\r\n      console.log(response)\r\n      \r\n    //The result is a JSON object returned with percentage_of_compatibility and other properties which gives a brief description of the licenses compared \r\n    });\r\n\r\n    \r\n    console.log(result)\r\n  };\r\n  return (\r\n    <div className=\"App\">\r\n      <h1>Check License Compatibility</h1>\r\n      <button onClick={checkLicenseCompatibility}>Click</button>\r\n    </div>\r\n  );\r\n}\r\n\r\nexport default App;\r\n\r\n```\r\n\r\n### API(conpareLicense)\r\n\r\ncompareLicenses( \r\n    apiKey,\r\n    first_license_name,\r\n    second_license_name,)\r\n\r\nare used to initiates comparison between two licenses.\r\n\r\n1. -`apiKey`: Your API key for accessing the process module service.\r\n\r\n### License\r\n\r\nThis project is licensed under the Apache License 2.0.\r\n\r\n### Powered by[DoWell UX Living Lab](https://uxlivinglab.com/en/)\r\n","readmeFilename":"README.md"}