Home / Function/ module() — express Function Reference

module() — express Function Reference

Architecture documentation for the module() function in tmpl.js from the express codebase.

Entity Profile

Dependency Diagram

graph TD
  1f1e9141_6d13_b249_4788_91e987beafcf["module()"]
  a166d058_6cee_b746_6ffd_1719d8a2a743["tmpl.js"]
  1f1e9141_6d13_b249_4788_91e987beafcf -->|defined in| a166d058_6cee_b746_6ffd_1719d8a2a743
  e730c5fb_4a7e_34ed_5825_f4a1f04bc517["generateVariableLookup()"]
  1f1e9141_6d13_b249_4788_91e987beafcf -->|calls| e730c5fb_4a7e_34ed_5825_f4a1f04bc517
  style 1f1e9141_6d13_b249_4788_91e987beafcf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

test/support/tmpl.js lines 5–23

module.exports = function renderFile(fileName, options, callback) {
  function onReadFile(err, str) {
    if (err) {
      callback(err);
      return;
    }

    try {
      str = str.replace(variableRegExp, generateVariableLookup(options));
    } catch (e) {
      err = e;
      err.name = 'RenderError'
    }

    callback(err, str);
  }

  fs.readFile(fileName, 'utf8', onReadFile);
};

Domain

Subdomains

Frequently Asked Questions

What does module() do?
module() is a function in the express codebase, defined in test/support/tmpl.js.
Where is module() defined?
module() is defined in test/support/tmpl.js at line 5.
What does module() call?
module() calls 1 function(s): generateVariableLookup.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free