| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Node-opensource is an API Wrapper that allows you to query the Open Source License API with Nodejs.
const licenses = require('node-opensource');
// Get all known licenses
licenses.all(function(err, data) {
// Do something with data
})
// Get license from it's OSI ID
licenses.get("MIT", function(err, data) {
// Do something with data
})
// Get license from keyword
licenses.tagged("copyleft", function(err, data) {
// Do something with data
})Using Promises
const licenses = require('node-opensource');
// Get all known licenses
licenses.all()
.then(function(data) {
// Do something with data
}).catch(function(error) {
// Error
});
// Get license from it's OSI ID
licenses.get("MIT")
.then(function(data) {
// Do something with data
}).catch(function(error) {
// Error
});
// Get license from keyword
licenses.tagged("copyleft")
.then(function(data) {
// Do something with data
}).catch(function(error) {
// Error
});npm install node-opensource
| Back | FazBrowse Home | New Git URL |