(loc: string, importMap: LockfileManifest)
| 159 | } |
| 160 | |
| 161 | export async function writeLockfile(loc: string, importMap: LockfileManifest): Promise<void> { |
| 162 | importMap.dependencies = sortObject(importMap.dependencies); |
| 163 | importMap.lock = sortObject(importMap.lock); |
| 164 | fs.writeFileSync(loc, JSON.stringify(importMap, undefined, 2), {encoding: 'utf8'}); |
| 165 | } |
| 166 | |
| 167 | export function isTruthy<T>(item: T | false | null | undefined): item is T { |
| 168 | return Boolean(item); |
no test coverage detected