fix(core): update
This commit is contained in:
15
ts/index.ts
15
ts/index.ts
@ -1,3 +1,16 @@
|
||||
import * as plugins from './smartxml.plugins';
|
||||
|
||||
export let standardExport = 'Hi there! :) This is an exported string';
|
||||
export class SmartXml {
|
||||
constructor() {}
|
||||
|
||||
public parseXmlToObject<T = any>(xmlStringArg: string): T {
|
||||
const jsonObject = plugins.fastXmlParser.convertToJson(xmlStringArg);
|
||||
return jsonObject;
|
||||
}
|
||||
|
||||
public createXmlFromObject(jsObject: any): string {
|
||||
const jsToXmlParser = new plugins.fastXmlParser.j2xParser({});
|
||||
const xml = jsToXmlParser.parse(jsObject);
|
||||
return xml;
|
||||
}
|
||||
}
|
@ -1,2 +1,5 @@
|
||||
const removeme = {};
|
||||
export { removeme };
|
||||
import * as fastXmlParser from 'fast-xml-parser';
|
||||
|
||||
export {
|
||||
fastXmlParser
|
||||
};
|
||||
|
Reference in New Issue
Block a user