{"_id":"spdx-expression-validate","_rev":"3182260","name":"spdx-expression-validate","description":"validate SPDX license expressions","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"time":{"modified":"2023-12-06T08:44:20.000Z","created":"2015-08-02T03:55:26.746Z","2.0.0":"2019-02-15T22:16:16.590Z","1.0.2":"2016-10-05T20:11:16.397Z","1.0.1":"2015-08-02T05:18:47.192Z","1.0.0":"2015-08-02T03:55:26.746Z"},"users":{},"author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx-expression-validate.js.git"},"versions":{"2.0.0":{"name":"spdx-expression-validate","description":"validate SPDX license expressions","version":"2.0.0","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"dependencies":{"spdx-expression-parse":"^3.0.0"},"devDependencies":{"defence-cli":"^2.0.1","replace-require-self":"^1.0.0","standard":"^12.0.1"},"homepage":"https://github.com/kemitchell/spdx.js","keywords":["SPDX","law","legal","license","metadata","package","package.json","standards"],"license":"(MIT AND CC-BY-3.0)","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx-expression-validate.js.git"},"scripts":{"test":"defence -i javascript README.md | replace-require-self | node","lint":"standard"},"gitHead":"a7c4716bba138dcfdde306be2ad2c99e95877784","bugs":{"url":"https://github.com/kemitchell/spdx-expression-validate.js/issues"},"_id":"spdx-expression-validate@2.0.0","_nodeVersion":"8.11.1","_npmVersion":"6.7.0","dist":{"shasum":"25c9408e1c63fad94fff5517bb7101ffcd23350b","size":1856,"noattachment":false,"key":"/spdx-expression-validate/-/spdx-expression-validate-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/spdx-expression-validate/download/spdx-expression-validate-2.0.0.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spdx-expression-validate_2.0.0_1550268976461_0.7034037104103203"},"_hasShrinkwrap":false,"publish_time":1550268976590,"_cnpm_publish_time":1550268976590,"_cnpmcore_publish_time":"2021-12-16T21:08:42.832Z"},"1.0.2":{"name":"spdx-expression-validate","description":"validate SPDX license expressions","version":"1.0.2","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"files":["index.js"],"dependencies":{"spdx-expression-parse":"^1.0.0"},"devDependencies":{"defence-cli":"^1.0.1","replace-require-self":"^1.0.0","standard":"^8.3.0"},"homepage":"https://github.com/kemitchell/spdx.js","keywords":["SPDX","law","legal","license","metadata","package","package.json","standards"],"license":"(MIT AND CC-BY-3.0)","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx-expression-validate.js.git"},"scripts":{"test":"defence -i javascript README.md | replace-require-self | node","lint":"standard"},"gitHead":"91065f05ececc7d1f33f5f70dbe43d404d9663eb","bugs":{"url":"https://github.com/kemitchell/spdx-expression-validate.js/issues"},"_id":"spdx-expression-validate@1.0.2","_shasum":"5a4e4d7616ed1c9b88150366b4217f767c27e9e3","_from":".","_npmVersion":"3.10.8","_nodeVersion":"4.6.0","_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"dist":{"shasum":"5a4e4d7616ed1c9b88150366b4217f767c27e9e3","size":1879,"noattachment":false,"key":"/spdx-expression-validate/-/spdx-expression-validate-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/spdx-expression-validate/download/spdx-expression-validate-1.0.2.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/spdx-expression-validate-1.0.2.tgz_1475698272906_0.1406639611814171"},"directories":{},"publish_time":1475698276397,"_hasShrinkwrap":false,"_cnpm_publish_time":1475698276397,"_cnpmcore_publish_time":"2021-12-16T21:08:43.047Z"},"1.0.1":{"name":"spdx-expression-validate","description":"validate SPDX license expressions","version":"1.0.1","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"dependencies":{"spdx-expression-parse":"^1.0.0"},"devDependencies":{"defence-cli":"^1.0.1","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 AND CC-BY-3.0)","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx-expression-validate.js.git"},"scripts":{"test":"defence -i javascript README.md | replace-require-self | node"},"gitHead":"6b733d8e702bded67974a7500f9e623bbe708a7d","bugs":{"url":"https://github.com/kemitchell/spdx-expression-validate.js/issues"},"_id":"spdx-expression-validate@1.0.1","_shasum":"a3aa1dfafde0d09f1e47983dbc739181f58ae31e","_from":".","_npmVersion":"2.13.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"dist":{"shasum":"a3aa1dfafde0d09f1e47983dbc739181f58ae31e","size":1833,"noattachment":false,"key":"/spdx-expression-validate/-/spdx-expression-validate-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/spdx-expression-validate/download/spdx-expression-validate-1.0.1.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"directories":{},"publish_time":1438492727192,"_hasShrinkwrap":false,"_cnpm_publish_time":1438492727192,"_cnpmcore_publish_time":"2021-12-16T21:08:43.261Z"},"1.0.0":{"name":"spdx-expression-validate","description":"validate SPDX license expressions","version":"1.0.0","author":{"name":"Kyle E. Mitchell","email":"kyle@kemitchell.com","url":"http://kemitchell.com"},"dependencies":{"spdx-expression-parse":"^1.0.0"},"devDependencies":{"defence-cli":"^1.0.1"},"homepage":"https://github.com/kemitchell/spdx.js","keywords":["SPDX","law","legal","license","metadata","package","package.json","standards"],"license":"(MIT AND CC-BY-3.0)","repository":{"type":"git","url":"git+https://github.com/kemitchell/spdx-expression-validate.js.git"},"scripts":{"test":"defence -i javascript README.md | sed 's!spdx-expression-validate!./!' | node"},"gitHead":"4bcf4f98e3246f883afa4961c35a79688bad70f5","bugs":{"url":"https://github.com/kemitchell/spdx-expression-validate.js/issues"},"_id":"spdx-expression-validate@1.0.0","_shasum":"857e1a9d25c3544c747625c832c2bb275166e353","_from":".","_npmVersion":"2.13.3","_nodeVersion":"0.12.7","_npmUser":{"name":"kemitchell","email":"kyle@kemitchell.com"},"dist":{"shasum":"857e1a9d25c3544c747625c832c2bb275166e353","size":1864,"noattachment":false,"key":"/spdx-expression-validate/-/spdx-expression-validate-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/spdx-expression-validate/download/spdx-expression-validate-1.0.0.tgz"},"maintainers":[{"name":"kemitchell","email":"kyle@kemitchell.com"}],"directories":{},"publish_time":1438487726746,"_hasShrinkwrap":false,"_cnpm_publish_time":1438487726746,"_cnpmcore_publish_time":"2021-12-16T21:08:43.527Z"}},"readme":"```javascript\nvar assert = require('assert')\nvar valid = require('spdx-expression-validate')\n```\n\n# Simple License Expressions\n```javascript\nassert(!valid('Invalid-Identifier'))\nassert(valid('GPL-2.0'))\nassert(valid('GPL-2.0+'))\nassert(valid('LicenseRef-23'))\nassert(valid('LicenseRef-MIT-Style-1'))\nassert(valid('DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2'))\n```\n\n# Composite License Expressions\n\n## Disjunctive `OR` Operator\n```javascript\nassert(valid('(LGPL-2.1 OR MIT)'))\nassert(valid('(LGPL-2.1 OR MIT OR BSD-3-Clause)'))\n```\n\n## Conjunctive `AND` Operator\n```javascript\nassert(valid('(LGPL-2.1 AND MIT)'))\nassert(valid('(LGPL-2.1 AND MIT AND BSD-2-Clause)'))\n```\n\n## Exception `WITH` Operator\n```javascript\nassert(valid('(GPL-2.0+ WITH Bison-exception-2.2)'))\n```\n\n# Strict Whitespace Rules\n```javascript\nassert(!valid('MIT '))\nassert(!valid(' MIT'))\nassert(!valid('MIT  AND  BSD-3-Clause'))\n```\n\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","_attachments":{},"homepage":"https://github.com/kemitchell/spdx.js","bugs":{"url":"https://github.com/kemitchell/spdx-expression-validate.js/issues"},"license":"(MIT AND CC-BY-3.0)"}