2
0
mirror of https://github.com/iconify/iconify.git synced 2024-11-08 06:15:24 +00:00

feat: add data for open source licenses

This commit is contained in:
Vjacheslav Trushkin 2023-06-22 11:54:29 +03:00
parent 39868cf79c
commit 4765dc962f
2 changed files with 94 additions and 1 deletions

View File

@ -3,7 +3,7 @@
"type": "module",
"description": "Common functions for working with Iconify icon sets used by various packages.",
"author": "Vjacheslav Trushkin",
"version": "2.1.6",
"version": "2.1.7",
"license": "MIT",
"bugs": "https://github.com/iconify/iconify/issues",
"homepage": "https://iconify.design/docs/libraries/utils/",
@ -327,6 +327,11 @@
"import": "./lib/misc/strings.mjs",
"types": "./lib/misc/strings.d.ts"
},
"./lib/misc/licenses": {
"require": "./lib/misc/licenses.cjs",
"import": "./lib/misc/licenses.mjs",
"types": "./lib/misc/licenses.d.ts"
},
"./lib/misc/objects": {
"require": "./lib/misc/objects.cjs",
"import": "./lib/misc/objects.mjs",

View File

@ -0,0 +1,88 @@
export interface LicenseInfo {
// Requires attribution
attribution: boolean;
// Allows commercial use
commercial: boolean;
// Keep same license
sameLicense?: boolean;
}
/**
* Data for open source licenses used by icon sets in `@iconify/json` package and smaller packages
*
* Key is SPDX license identifier
*/
export const licensesData: Record<string, LicenseInfo> = {
'Apache-2.0': {
attribution: false,
commercial: true,
},
'MIT': {
attribution: false,
commercial: true,
},
'CC0-1.0': {
attribution: false,
commercial: true,
},
'MPL-2.0': {
attribution: false,
commercial: true,
},
'CC-BY-3.0': {
attribution: true,
commercial: true,
},
'CC-BY-SA-3.0': {
attribution: true,
commercial: true,
sameLicense: true,
},
'CC-BY-4.0': {
attribution: true,
commercial: true,
},
'CC-BY-SA-4.0': {
attribution: true,
commercial: true,
sameLicense: true,
},
'CC-BY-NC-4.0': {
attribution: true,
commercial: false,
},
'ISC': {
attribution: false,
commercial: true,
},
'OFL-1.1': {
attribution: false,
commercial: true,
},
'GPL-2.0-only': {
attribution: false,
commercial: false,
sameLicense: true,
},
'GPL-2.0-or-later': {
attribution: false,
commercial: false,
sameLicense: true,
},
'GPL-3.0': {
attribution: false,
commercial: false,
sameLicense: true,
},
'GPL-3.0-or-later': {
attribution: false,
commercial: false,
sameLicense: true,
},
'Unlicense': {
attribution: false,
commercial: true,
},
};