-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to skip validation of license names #27
base: main
Are you sure you want to change the base?
Conversation
I noticed my pull request is similar to #16. It would help me out a lot if one of those two was merged with your project. I believe my version is more light-weight, but it only works with Node.js 6 or higher, since I use a default value for the optional argument. |
@julienandco someone else was interested in this, too. I believe the Microsoft folks may actually be running a fork for this purpose. |
index.js
Outdated
@@ -3,6 +3,6 @@ | |||
var scan = require('./scan') | |||
var parse = require('./parse') | |||
|
|||
module.exports = function (source) { | |||
return parse(scan(source)) | |||
module.exports = function (source, validateLicenseNames = true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typically i'd expect absence and false to be the same for boolean options; this should probably be inverted so it can default to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are absolutely right, I will change this.
ce3167f
to
19f25b5
Compare
This option allows the parsing of license names that are not listed in the spdx-license-ids module.