var assert = require('assert')
var isOSIApproved = require('spdx-is-osi')
// The MIT License
// Has an SPDX identifier
// An OSI-approved license
assert.strictEqual(isOSIApproved('MIT'), true)
// Zope Public License 2.1
// Has an SPDX identifier
// Not an OSI-approved license
assert.strictEqual(isOSIApproved('ZPL-2.1'), false)
// Dual-licensing under MIT and Zope 2.1
assert.strictEqual(isOSIApproved('(MIT OR ZPL-2.1)'), true)
// Double-licensing under MIT and Zope 2.1
assert.strictEqual(isOSIApproved('(MIT AND ZPL-2.1)'), false)
// Licensing under current and subsequent versions.
assert.strictEqual(isOSIApproved('(GPL-2.0+)'), true)
-
Notifications
You must be signed in to change notification settings - Fork 1
test whether an SPDX expression is OSI-approved
License
jslicense/spdx-is-osi.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
test whether an SPDX expression is OSI-approved
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published