zyejMAll-mobile/sheep/api/migration/index.js

11 lines
230 B
JavaScript
Raw Permalink Normal View History

2024-08-07 10:31:42 +08:00
const files = import.meta.glob('./*.js', { eager: true });
let api = {};
Object.keys(files).forEach((key) => {
api = {
...api,
[key.replace(/(.*\/)*([^.]+).*/gi, '$2')]: files[key].default,
};
});
2024-08-07 21:40:27 +08:00
export default api;