24 lines
517 B
TypeScript
24 lines
517 B
TypeScript
export interface MetaType {
|
|
name?: string;
|
|
as?: string;
|
|
from?: string;
|
|
use?: {
|
|
as?: string;
|
|
};
|
|
}
|
|
|
|
export function toMeta(arr?: any[]): MetaType[] | undefined {
|
|
return arr?.map((item) => {
|
|
const it = typeof item === 'string' ? { name: item } : item;
|
|
|
|
it.as ??= it?.name;
|
|
it.from ??= `primevue/${it?.name?.toLowerCase()}`;
|
|
|
|
return it;
|
|
});
|
|
}
|
|
|
|
export * from './components/index';
|
|
export * from './composables/index';
|
|
export * from './directives/index';
|