cleaning
This commit is contained in:
@ -36,7 +36,6 @@ export class Document extends XmlComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clearVariables(): void {
|
clearVariables(): void {
|
||||||
console.log("clearing");
|
|
||||||
this.body.clearVariables();
|
this.body.clearVariables();
|
||||||
delete this.body;
|
delete this.body;
|
||||||
}
|
}
|
||||||
|
@ -13,20 +13,6 @@ export class Formatter {
|
|||||||
|
|
||||||
private replaceKeys(input: XmlComponent): Object {
|
private replaceKeys(input: XmlComponent): Object {
|
||||||
input.replaceKey();
|
input.replaceKey();
|
||||||
this.deepTraverseJson(input, (parent, value, key) => {
|
|
||||||
/*if (isNaN(key) && key !== "rootKey") {
|
|
||||||
var newKey = parent.rootKey;
|
|
||||||
console.log(key);
|
|
||||||
if (newKey) {
|
|
||||||
parent[newKey] = parent[key];
|
|
||||||
delete parent[key];
|
|
||||||
} else {
|
|
||||||
//console.error("Key is not in dictionary:" + key);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
//console.log(value);
|
|
||||||
//parent.replaceKey();
|
|
||||||
});
|
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,5 @@ export abstract class Packer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.archive.finalize();
|
this.archive.finalize();
|
||||||
console.log("done");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -15,7 +15,6 @@ describe("ParagraphStyle", () => {
|
|||||||
it("should create a style with given value", () => {
|
it("should create a style with given value", () => {
|
||||||
style = new Style("test");
|
style = new Style("test");
|
||||||
var newJson = jsonify(style);
|
var newJson = jsonify(style);
|
||||||
console.log(newJson.root[0].root.val);
|
|
||||||
assert.equal(newJson.root[0].root.val, "test");
|
assert.equal(newJson.root[0].root.val, "test");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user