MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / exportItems

Function exportItems

site/source/get_api_items.py:73–84  ·  view source on GitHub ↗

Export the API items into form for use in another script.

()

Source from the content-addressed store, hash-verified

71
72
73def exportItems():
74 """Export the API items into form for use in another script."""
75 with open(api_item_filename, 'w', encoding='utf-8') as infile:
76 # write function lead in
77 infile.write("# Auto-generated file (see get_api_items.py)\n\ndef get_mapped_items():\n mapped_wiki_inline_code = dict()\n")
78
79 for key, value in sorted(api_reference_items.items()):
80 # Write out each API item to add
81 infile.write(" mapped_wiki_inline_code['%s'] = '%s'\n" % (key, value))
82
83 # write the return function
84 infile.write(" return mapped_wiki_inline_code\n")
85
86
87def main():

Callers 1

mainFunction · 0.85

Calls 2

openFunction · 0.50
writeMethod · 0.45

Tested by

no test coverage detected