1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Update SDK TS defs and improve extensions getter functions (#10978)

This commit is contained in:
Álvaro Mondéjar Rubio 2024-05-20 14:06:02 +02:00 committed by GitHub
parent 7777cbabfe
commit 06deb20e92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

3
sdk.d.ts vendored
View File

@ -80,4 +80,7 @@ export function normalizeColor(text: string): string;
export function getThirdPartyExtensions(
readmePath?: string,
): Promise<ThirdPartyExtension[]>;
export function getThirdPartyLibraries(
readmePath?: string,
): Promise<ThirdPartyExtension[]>;
export const collator: Intl.Collator;

View File

@ -197,8 +197,8 @@ export const getThirdPartyExtensions = async (
) =>
normalizeNewlines(await fs.readFile(readmePath, 'utf8'))
.split('## Third-Party Extensions')[1]
.split('\n\n')[2]
.split('\n')
.split('|\n\n')[0]
.split('|\n|')
.slice(2)
.map((line) => {
let [module, author] = line.split(' | ');
@ -228,8 +228,8 @@ export const getThirdPartyLibraries = async (
) =>
normalizeNewlines(await fs.readFile(readmePath, 'utf8'))
.split('## Third-Party Libraries')[1]
.split('\n\n')[2]
.split('\n')
.split('|\n\n')[0]
.split('|\n|')
.slice(2)
.map((line) => {
let [module, author] = line.split(' | ');