Home / Function/ propNamesListJoin() — react Function Reference

propNamesListJoin() — react Function Reference

Architecture documentation for the propNamesListJoin() function in ReactDOMResourceValidation.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  531aeaa1_f04f_c768_239b_abe1de80a22b["propNamesListJoin()"]
  67f50fa6_411e_5d62_45b5_7c7e5640bc66["ReactDOMResourceValidation.js"]
  531aeaa1_f04f_c768_239b_abe1de80a22b -->|defined in| 67f50fa6_411e_5d62_45b5_7c7e5640bc66
  5dbaf64d_b9cc_4d34_c006_111eb2b6e831["validateLinkPropsForStyleResource()"]
  5dbaf64d_b9cc_4d34_c006_111eb2b6e831 -->|calls| 531aeaa1_f04f_c768_239b_abe1de80a22b
  style 531aeaa1_f04f_c768_239b_abe1de80a22b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-dom-bindings/src/shared/ReactDOMResourceValidation.js lines 43–63

function propNamesListJoin(
  list: Array<string>,
  combinator: 'and' | 'or',
): string {
  switch (list.length) {
    case 0:
      return '';
    case 1:
      return list[0];
    case 2:
      return list[0] + ' ' + combinator + ' ' + list[1];
    default:
      return (
        list.slice(0, -1).join(', ') +
        ', ' +
        combinator +
        ' ' +
        list[list.length - 1]
      );
  }
}

Domain

Subdomains

Frequently Asked Questions

What does propNamesListJoin() do?
propNamesListJoin() is a function in the react codebase, defined in packages/react-dom-bindings/src/shared/ReactDOMResourceValidation.js.
Where is propNamesListJoin() defined?
propNamesListJoin() is defined in packages/react-dom-bindings/src/shared/ReactDOMResourceValidation.js at line 43.
What calls propNamesListJoin()?
propNamesListJoin() is called by 1 function(s): validateLinkPropsForStyleResource.

Analyze Your Own Codebase

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

Try Supermodel Free