-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add just a few examples back to README
- Loading branch information
1 parent
5a7b02f
commit 58a802d
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
`satisfies(SPDX license expression, array of approved licenses)` | ||
|
||
Approved licenses may be simple license identifiers like `MIT`, plus-ranges like `EPL-2.0+`, or licenses with exceptions like `Apache-2.0 WITH LLVM`. They may _not_ be compound expressions using `AND` or `OR`. | ||
|
||
```javascript | ||
var assert = require('assert') | ||
var satisfies = require('spdx-satisfies') | ||
|
||
assert(satisfies('MIT', ['MIT', 'ISC', 'BSD-2-Clause', 'Apache-2.0'])) | ||
assert(satisfies('GPL-2.0 OR MIT', ['MIT'])) | ||
assert(!satisfies('GPL-2.0 AND MIT', ['MIT'])) | ||
assert(satisfies('GPL-3.0', ['GPL-2.0+'])) | ||
assert(!satisfies('GPL-1.0', ['GPL-2.0+'])) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters