docs: added upgrade guide for admin (#2816)
This commit is contained in:
9
www/docs/src/utils/filterListItems.ts
Normal file
9
www/docs/src/utils/filterListItems.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export default function filterListItems (items: any[], pathPattern: string | RegExp) {
|
||||
if (!items.length) {
|
||||
return items
|
||||
}
|
||||
|
||||
let pattern = new RegExp(pathPattern)
|
||||
|
||||
return items.filter((item) => pattern.test(item.href))
|
||||
}
|
||||
Reference in New Issue
Block a user