UNPKG

@feflow/cli

Version:
15 lines (13 loc) 381 B
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; }