Skip to content

Commit

Permalink
Simplify filesystem method export. NFC (#22331)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Aug 8, 2024
1 parent 58359ba commit da3a1b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/library_fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ FS.ignorePermissions = false;
addAtExit('FS.quit();');
return `
FS.createPreloadedFile = FS_createPreloadedFile;
FS.staticInit();` +
// Get module methods from settings
'{{{ EXPORTED_RUNTIME_METHODS.filter(function(func) { return func.substr(0, 3) === 'FS_' }).map(function(func){return 'Module["' + func + '"] = FS.' + func.substr(3) + ";"}).reduce(function(str, func){return str + func;}, '') }}}';
FS.staticInit();
// Set module methods based on EXPORTED_RUNTIME_METHODS
{{{ EXPORTED_RUNTIME_METHODS.filter((func) => func.startsWith('FS_')).map((func) => 'Module["' + func + '"] = FS.' + func.substr(3) + ";\n").reduce((str, func) => str + func, '') }}}`;
},
$FS: {
root: null,
Expand Down

0 comments on commit da3a1b6

Please sign in to comment.