{"name":"spdx","description":"parse SPDX license expressions","version":"0.4.2","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"bugs":{"url":"https://github.com/kemitchell/spdx.js/issues"},"dependencies":{"spdx-exceptions":"^1.0.0","spdx-license-ids":"^1.0.0"},"devDependencies":{"defence-cli":"^1.0.1","jison":"^0.4.15","replace-require-self":"^1.0.0"},"homepage":"https://github.com/kemitchell/spdx.js","keywords":["SPDX","law","legal","license","metadata","package","package.json","standards"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx.js.git"},"scripts":{"prepublish":"node generate-parser.js > parser.generated.js","pretest":"npm run prepublish","test":"defence README.md | replace-require-self | node"},"gitHead":"d54d741609c6b99dff484d335926548996d3520a","_id":"spdx@0.4.2","_shasum":"6c43bdd6b4b27f0235394b6d1bedbf5788d4793d","_from":".","_npmVersion":"3.4.0","_nodeVersion":"5.1.0","_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"dist":{"shasum":"6c43bdd6b4b27f0235394b6d1bedbf5788d4793d","tarball":"http://registry-npm.ywwl.com/spdx/download/spdx-0.4.2.tgz","integrity":"sha512-PZd7J3EmOxGOX0/z49QJjg9wYKNdX6Xqw922xsb+e/6cuu9waMZQ5gjr6sm+t7W5N5DEZpjzfEhwtiU8S/IBEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDI3JI2qOei6ZGL/iF0KGzD56FfjqpXygBAiA5KOzz6/AiAVc1EAoR9+zZOdmavgbromfa4EJixdvzNjvkcEN9aGEw=="}],"size":11839,"noattachment":false,"key":"/spdx/-/spdx-0.4.2.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"},{"name":"othiym23","email":"ogd@aoaioxxysz.net"}],"deprecated":"see spdx-expression-parse, spdx-satisfies, &c.","directories":{},"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":1448479593360,"_cnpm_publish_time":1448479593360,"dist-tags":{"latest":"0.5.2"}}