How to use spdx-exceptions - 2 common examples

To help you get started, we’ve selected a few spdx-exceptions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jslicense / spdx-expression-parse.js / scanner.js View on Github external
function tokenTypeForString (string, start) {
  if (ids.indexOf(string) !== -1) {
    return 'LICENSE'
  } else if (string === 'AND') {
    return 'AND'
  } else if (string === 'OR') {
    return 'OR'
  } else if (string === 'WITH') {
    return 'WITH'
  } else if (exceptions.indexOf(string) !== -1) {
    return 'EXCEPTION'
  } else if (LICENSEREF.test(string)) {
    return 'LICENSEREF'
  } else if (DOCUMENTREF.test(string)) {
    return 'DOCUMENTREF'
  } else if (string === '(') {
    return 'OPEN'
  } else if (string === ')') {
    return 'CLOSE'
  } else if (string === '+') {
    return 'PLUS'
  } else if (string === ':') {
    return 'COLON'
  } else {
    throw new Error('Invalid input at offset ' + start)
  }
github jslicense / spdx-expression-parse.js / scan.js View on Github external
function identifier () {
    var begin = index
    var string = idstring()

    if (licenses.indexOf(string) !== -1) {
      return {
        type: 'LICENSE',
        string: string
      }
    } else if (exceptions.indexOf(string) !== -1) {
      return {
        type: 'EXCEPTION',
        string: string
      }
    }

    index = begin
  }

spdx-exceptions

list of SPDX standard license exceptions

CC-BY-3.0
Latest version published 3 months ago

Package Health Score

72 / 100
Full package analysis

Popular spdx-exceptions functions

Similar packages