@sap-ux/i18n
Version:
Library for i18n
17 lines • 448 B
JavaScript
import { FileFormat } from './types.js';
import { parseProperties } from './properties/parser/index.js';
import { parseCsv } from './csv/parser/index.js';
/**
* Parse text.
*
* @param text text
* @param format extension format
* @returns parse result
*/
export function parse(text, format) {
if (format === FileFormat.properties) {
return parseProperties(text);
}
return parseCsv(text);
}
//# sourceMappingURL=index.js.map