mirror of
https://github.com/Mibew/simple-icons.git
synced 2025-01-17 23:51:08 +03:00
Omit undefined properties (#8582)
This commit is contained in:
parent
d42c4a0883
commit
e9c814ac00
@ -63,8 +63,10 @@ const build = async () => {
|
||||
escape(icon.path),
|
||||
escape(icon.source),
|
||||
escape(icon.hex),
|
||||
icon.guidelines ? `'${escape(icon.guidelines)}'` : undefined,
|
||||
licenseToObject(icon.license),
|
||||
icon.guidelines ? `\n guidelines: '${escape(icon.guidelines)}',` : '',
|
||||
licenseToObject(icon.license)
|
||||
? `\n license: ${JSON.stringify(licenseToObject(icon.license))},`
|
||||
: '',
|
||||
);
|
||||
};
|
||||
const writeJs = async (filepath, rawJavaScript, opts = null) => {
|
||||
|
@ -6,7 +6,5 @@
|
||||
},
|
||||
path: '%s',
|
||||
source: '%s',
|
||||
hex: '%s',
|
||||
guidelines: %s,
|
||||
license: %s,
|
||||
hex: '%s',%s%s
|
||||
}
|
||||
|
4
types.d.ts
vendored
4
types.d.ts
vendored
@ -25,6 +25,6 @@ export interface SimpleIcon {
|
||||
path: string;
|
||||
source: string;
|
||||
hex: string;
|
||||
guidelines: string | undefined;
|
||||
license: License | undefined;
|
||||
guidelines?: string;
|
||||
license?: License;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user