@feflow/cli
Version:
A front-end flow tool.
15 lines (13 loc) • 381 B
text/typescript
import versionImpl from './version';
export function toInstalled(oInstalled: any): Map<string, string> {
const installed = new Map<string, string>();
if (!oInstalled) {
return installed;
}
Object.entries(oInstalled).forEach(([key, version]: [string, any]) => {
if (versionImpl.check(version)) {
installed.set(key, version);
}
});
return installed;
}