Skip to content

Commit 16034ae

Browse files
committed
Refactor README examples for easier reading
1 parent c861105 commit 16034ae

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

README.md

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,30 @@
22
var parse = require('spdx-expression-parse')
33
var assert = require('assert')
44

5-
var firstAST = {
6-
left: {license: 'LGPL-2.1'},
7-
conjunction: 'or',
8-
right: {
9-
left: {license: 'BSD-3-Clause'},
10-
conjunction: 'and',
11-
right: {license: 'MIT'}
12-
}
13-
}
14-
155
assert.deepEqual(
166
parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'),
17-
firstAST
18-
)
19-
20-
var secondAST = {
21-
left: {license: 'MIT'},
22-
conjunction: 'and',
23-
right: {
24-
left: {license: 'LGPL-2.1', plus: true},
25-
conjunction: 'and',
26-
right: {license: 'BSD-3-Clause'}
7+
{
8+
left: {license: 'LGPL-2.1'},
9+
conjunction: 'or',
10+
right: {
11+
left: {license: 'BSD-3-Clause'},
12+
conjunction: 'and',
13+
right: {license: 'MIT'}
14+
}
2715
}
28-
}
16+
)
2917

3018
assert.deepEqual(
3119
parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'),
32-
secondAST
20+
{
21+
left: {license: 'MIT'},
22+
conjunction: 'and',
23+
right: {
24+
left: {license: 'LGPL-2.1', plus: true},
25+
conjunction: 'and',
26+
right: {license: 'BSD-3-Clause'}
27+
}
28+
}
3329
)
3430

3531
// We handle all the bare SPDX license and exception ids as well.

0 commit comments

Comments
 (0)