You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rebecca Turner 32b51c97ec deps: upgrade npm to 3.3.6 10 years ago
..
LICENSE deps: upgrade npm to 3.3.6 9 years ago
README.md deps: upgrade npm to 3.3.6 9 years ago
index.js deps: upgrade npm to 3.3.6 9 years ago
package.json deps: upgrade npm to 3.3.6 9 years ago
parser.generated.js deps: upgrade npm to 3.3.6 9 years ago

README.md

var parse = require('./')
var assert = require('assert')

var firstAST = {
  left: { license: 'LGPL-2.1' },
  conjunction: 'or',
  right: {
    left: { license: 'BSD-3-Clause' },
    conjunction: 'and',
    right: { license: 'MIT' } } }

assert.deepEqual(
  parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'),
  firstAST)

var secondAST = {
  left: { license: 'MIT' },
  conjunction: 'and',
  right: {
    left: {
	  license: 'LGPL-2.1',
	  plus: true },
    conjunction: 'and',
    right: { license: 'BSD-3-Clause' } } }

assert.deepEqual(
  parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'),
  secondAST)

The Software Package Data Exchange (SPDX) specification is the work of the Linux Foundation and its contributors, and is licensed under the terms of the Creative Commons Attribution License 3.0 Unported (SPDX: "CC-BY-3.0"). "SPDX" is a United States federally registered trademark of the Linux Foundation.