licenses.cjs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. 'use strict';
  2. const freeLicense = {
  3. attribution: false,
  4. commercial: true
  5. };
  6. const freeSameLicense = {
  7. attribution: false,
  8. commercial: true,
  9. sameLicense: true
  10. };
  11. const attribLicense = {
  12. attribution: true,
  13. commercial: true
  14. };
  15. const attribSameLicense = {
  16. attribution: true,
  17. commercial: true,
  18. sameLicense: true
  19. };
  20. const attribNonCommercialLicense = {
  21. attribution: true,
  22. commercial: false
  23. };
  24. const attribNonCommercialSameLicense = {
  25. attribution: true,
  26. commercial: false,
  27. sameLicense: true
  28. };
  29. const licensesData = {
  30. "Apache-2.0": freeLicense,
  31. "MIT": freeLicense,
  32. "MPL-2.0": freeLicense,
  33. "CC0-1.0": freeLicense,
  34. "CC-BY-3.0": attribLicense,
  35. "CC-BY-SA-3.0": attribSameLicense,
  36. "CC-BY-4.0": attribLicense,
  37. "CC-BY-SA-4.0": attribSameLicense,
  38. "CC-BY-NC-4.0": attribNonCommercialLicense,
  39. "CC-BY-NC-SA-4.0": attribNonCommercialSameLicense,
  40. "ISC": freeLicense,
  41. "OFL-1.1": freeLicense,
  42. "GPL-2.0-only": freeSameLicense,
  43. "GPL-2.0-or-later": freeSameLicense,
  44. "GPL-3.0": freeSameLicense,
  45. "GPL-3.0-or-later": freeSameLicense,
  46. "Unlicense": freeLicense,
  47. "BSD-2-Clause": freeLicense,
  48. "BSD-3-Clause": freeLicense
  49. };
  50. exports.licensesData = licensesData;