@enspirit/emb
Version:
A replacement for our Makefile-for-monorepos
21 lines (20 loc) • 540 B
JavaScript
export * from './EMBCollection.js';
export * from './graph.js';
export * from './types.js';
// implementation
export function toIdentifedHash(hash, parentName) {
const out = {};
for (const key in hash) {
if (!Object.hasOwn(hash, key)) {
continue;
}
const value = hash[key];
out[key] = {
...value,
id: parentName ? `${parentName}:${key}` : key,
name: key,
...(parentName ? { component: parentName } : {}),
};
}
return out;
}