IDF, JSON, and their happy lives together
npm install idf2jsonIDF, JSON, and their happy lives together
npm install idf2json``javascript`
var idf2json = new require('idf2json')(options);
* idd_path - path to an IDD JSON file, used for annotating IDF files
* idd_index - an in-memory object that represents the IDD in cache for IDF annotating
* idd_to_json(text) - convert a text IDD into JSON
* idf_to_json(text, options) - convert a text IDF into JSON. Include options.idd as an in-memory object to use for IDD annotations.options.idd
* idd_for_idf(idf, options) - return relevant IDD entries for a given IDF JSON file. Include as an in-memory object to use for IDD annotations.path
* idd_json_to_xml(json) - convert an IDD JSON object to XML.
* idf_json_to_xml(json) - convert an IDF JSON object to XML.
* parse_file(path, options, callback) - read a text file at , pass the resulting transformed JSON to callback. Include options.type = 'idd' for an IDD, otherwise defaults to an IDF. Include options.format = 'xml' to pass XML instead of JSON.input_path
* write_file(input_path, output_path, options, callback) - read a text file at , transform it, and write to output_path. Include options.type = 'idd' for an IDD, otherwise defaults to an IDF. Include options.format = 'xml'` to transform to XML instead of JSON.