UNPKG

docusaurus-plugin-typedoc-api

Version:

Docusaurus plugin that provides source code API documentation powered by TypeDoc.

11 lines (9 loc) 233 B
export function removeScopes(text: string, scopes: string[]): string { if (scopes.length === 0) { return text; } return scopes.reduce( (value, scope) => value.replace(new RegExp(`^(${scope}-|@${scope}/)`), ''), text, ); }