Home / Function/ textTransformSource() — react Function Reference

textTransformSource() — react Function Reference

Architecture documentation for the textTransformSource() function in region.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  bfa88e1d_019b_bac4_1069_2c6d59a840ce["textTransformSource()"]
  df4a6afe_3473_bd9e_5bea_d0af5290c8bd["region.js"]
  bfa88e1d_019b_bac4_1069_2c6d59a840ce -->|defined in| df4a6afe_3473_bd9e_5bea_d0af5290c8bd
  02e17ce9_39c5_527b_ef05_7e74510e2765["transformSourceImpl()"]
  02e17ce9_39c5_527b_ef05_7e74510e2765 -->|calls| bfa88e1d_019b_bac4_1069_2c6d59a840ce
  style bfa88e1d_019b_bac4_1069_2c6d59a840ce fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/flight-esm/loader/region.js lines 31–42

async function textTransformSource(source, context, defaultTransformSource) {
  const {format} = context;
  if (format === 'module') {
    if (typeof source === 'string') {
      return {source};
    }
    return {
      source: Buffer.from(source).toString('utf8'),
    };
  }
  return defaultTransformSource(source, context, defaultTransformSource);
}

Domain

Subdomains

Frequently Asked Questions

What does textTransformSource() do?
textTransformSource() is a function in the react codebase, defined in fixtures/flight-esm/loader/region.js.
Where is textTransformSource() defined?
textTransformSource() is defined in fixtures/flight-esm/loader/region.js at line 31.
What calls textTransformSource()?
textTransformSource() is called by 1 function(s): transformSourceImpl.

Analyze Your Own Codebase

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

Try Supermodel Free