{"name":"spdx","description":"SPDX License Expression Syntax parser","version":"0.1.0","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"bugs":{"url":"https://github.com/kemitchell/spdx.js/issues"},"devDependencies":{"check-versions":"^1.0.0","docco":"^0.7.0","jscs":"^1.12.0","jshint":"^2.7.0","jsmd":"^0.3.0"},"homepage":"https://github.com/kemitchell/spdx.js","keywords":["SPDX","law","license","license expression","metadata","standards"],"license":"Apache-2.0","main":"spdx.js","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx.js.git"},"scripts":{"check":"check-versions --check-module","doc":"docco --output documentation spdx.js","lint":"jshint spdx.js && jscs spdx.js","precommit":"npm run check && npm run lint && npm run test","test":"jsmd README.md"},"gitHead":"a0e7f811e21c0f32d65cf5a927a0d580f483c604","_id":"spdx@0.1.0","_shasum":"8d4bd6a612ac41127a8799aeb8d8afc04ddee982","_from":".","_npmVersion":"2.8.3","_nodeVersion":"1.7.2","_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"dist":{"shasum":"8d4bd6a612ac41127a8799aeb8d8afc04ddee982","tarball":"http://registry-npm.ywwl.com/spdx/download/spdx-0.1.0.tgz","integrity":"sha512-az3Qzl9bkvX2GcIJwKQtnrecrtk13uzSmuHDBmyQt/umxR5mRUmmEkV1Qua3UM92Dl2Ae6sipYYeCpoB8fqjpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDd7ZWHgSkivZDoWw+d1ifRjAJLTBBddjmtebm1V2ERoAIgaSROsfYNfG9R1bUnCf9J4rzImqOD0GeY0V5bu3lDJA8="}],"size":4869,"noattachment":false,"key":"/spdx/-/spdx-0.1.0.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"directories":{},"deprecated":"see spdx-expression-parse, spdx-satisfies, &c.","readme":"# Use Other Packages\n\n**Development on spdx.js has moved to separate, smaller packages.**\n\n[spdx-expression-parse][parse] and [spdx-satisfies][satisfies] are\ndirect successors to spdx.js.\n\nYou may also be interested in [spdx-compare][compare],\n[spdx-correct][correct], and [other packages on the npm public\nregistry][search]. [kemitchell][kemitchell] writes a lot of them.\n\n[compare]: https://www.npmjs.com/package/spdx-compare\n[correct]: https://www.npmjs.com/package/spdx-correct\n[kemitchell]: https://www.npmjs.com/~kemitchell\n[parse]: https://www.npmjs.com/package/spdx-expression-parse\n[satisfies]: https://www.npmjs.com/package/spdx-satisfies\n[search]: https://www.npmjs.com/search?q=spdx\n\n---\n\n```javascript\nvar spdx = require('spdx')\n```\n\n# Simple License Expressions\n\n```javascript\nvar assert = require('assert')\nassert(spdx.valid('Invalid-Identifier') === null)\nassert(spdx.valid('GPL-2.0'))\nassert(spdx.valid('GPL-2.0+'))\nassert(spdx.valid('LicenseRef-23'))\nassert(spdx.valid('LicenseRef-MIT-Style-1'))\nassert(spdx.valid('DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2'))\n```\n\n# Composite License Expressions\n\n## Disjunctive `OR` Operator\n```javascript\nassert(spdx.valid('(LGPL-2.1 OR MIT)'))\nassert(spdx.valid('(LGPL-2.1 OR MIT OR BSD-3-Clause)'))\n```\n\n## Conjunctive `AND` Operator\n```javascript\nassert(spdx.valid('(LGPL-2.1 AND MIT)'))\nassert(spdx.valid('(LGPL-2.1 AND MIT AND BSD-2-Clause)'))\n```\n\n## Exception `WITH` Operator\n\n```javascript\nassert(spdx.valid('(GPL-2.0+ WITH Bison-exception-2.2)'))\n```\n\n## Order of Precedence and Parentheses\n\n```javascript\nassert.deepEqual(\n  spdx.parse('(LGPL-2.1 OR BSD-3-Clause AND MIT)'),\n  { left: { license: 'LGPL-2.1' },\n    conjunction: 'or',\n    right: {\n      left: { license: 'BSD-3-Clause' },\n      conjunction: 'and',\n      right: { license: 'MIT' } } })\n\nassert.deepEqual(\n  spdx.parse('(MIT AND (LGPL-2.1+ AND BSD-3-Clause))'),\n  { left: { license: 'MIT' },\n    conjunction: 'and',\n    right: {\n      left: {\n        license: 'LGPL-2.1',\n        plus: true },\n      conjunction: 'and',\n      right: { license: 'BSD-3-Clause' } } })\n```\n\n# Strict Whitespace Rules\n\n```javascript\nassert(!spdx.valid('MIT '))\nassert(!spdx.valid(' MIT'))\nassert(!spdx.valid('MIT  AND  BSD-3-Clause'))\n```\n\n# Identifier Lists\n\n```javascript\nassert(Array.isArray(spdx.licenses))\nassert(spdx.licenses.indexOf('ISC') > -1)\nassert(spdx.licenses.indexOf('Apache-1.7') < 0)\nassert(spdx.licenses.every(function(element) {\n  return typeof element === 'string' }))\n\nassert(Array.isArray(spdx.exceptions))\nassert(spdx.exceptions.indexOf('GCC-exception-3.1') > -1)\nassert(spdx.exceptions.every(function(element) {\n  return typeof element === 'string' }))\n```\n\n# The Specification\n\n```javascript\nassert.equal(spdx.specificationVersion, '2.0')\n```\n\n[The Software Package Data Exchange (SPDX) specification](http://spdx.org) is the work of the [Linux Foundation](http://www.linuxfoundation.org) and its contributors, and is licensed under the terms of [the Creative Commons Attribution License 3.0 Unported (SPDX: \"CC-BY-3.0\")](http://spdx.org/licenses/CC-BY-3.0). \"SPDX\" is a United States federally registered trademark of the Linux Foundation.\n","publish_time":1429893757959,"_cnpm_publish_time":1429893757959,"dist-tags":{"latest":"0.5.2"}}