Implement MergedMap pattern
This commit is contained in:
parent
dc19a5ed9e
commit
63c41f07cb
2 changed files with 27 additions and 3 deletions
debug
|
@ -36,7 +36,7 @@ User: tirga
|
|||
const idv = Idv.parse(textarea.value);
|
||||
|
||||
pre.textContent = JSON.stringify(
|
||||
idv.getMap("User", UserFromDocument),
|
||||
idv.getMergedMap("User", UserFromDocument),
|
||||
null,
|
||||
2
|
||||
);
|
||||
|
@ -49,8 +49,7 @@ User: tirga
|
|||
return [textarea, pre];
|
||||
}
|
||||
|
||||
const UserFromDocument = (lines: string[]) => {
|
||||
const idv = Idv.parseLines(lines);
|
||||
const UserFromDocument = (idv: Idv) => {
|
||||
return {
|
||||
shell: idv.getProperty("Shell", String, StringFromDocument),
|
||||
groups: idv.getList("Group", String, StringFromDocument),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue