Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

julienandco
Copy link

This option allows the parsing of license names that are not listed in the spdx-license-ids module.

@julienandco
Copy link
Author

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.

@kemitchell
Copy link
Member

@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) {
Copy link
Member

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?

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants