# All files / lib/util internals.js

100% Statements 59/59
100% Branches 1/1
100% Functions 0/0
100% Lines 59/59

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    602x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
    2x
     import Transaction, { defaultTasks, tasks } from '../transaction';
    import createNode from '../node/create';
    import syncTree from '../tree/sync';
    import decodeEntities from './decode-entities';
    import escape from './escape';
    import makeMeasure from './make-measure';
    import * as memory from './memory';
    import Pool from './pool';
    import process from './process';
    import { globalConfig } from './config';
    import {
      PATCH_TYPE,
      Internals,
      StateCache,
      NodeCache,
      TransitionCache,
      MiddlewareCache,
      CreateTreeHookCache,
      CreateNodeHookCache,
      SyncTreeHookCache,
      ReleaseHookCache,
      ParseHookCache,
    } from './types';

    const caches = {
      StateCache,
      NodeCache,
      TransitionCache,
      MiddlewareCache,
      CreateTreeHookCache,
      CreateNodeHookCache,
      SyncTreeHookCache,
      ReleaseHookCache,
      ParseHookCache,
    };

    export default /** @type {Internals} */ ({
      // Utils.
      decodeEntities,
      escape,
      makeMeasure,
      memory,
      Pool,
      process,
      PATCH_TYPE,
      globalConfig,

      // Core.
      createNode,
      syncTree,

      // Tasks.
      Transaction,
      defaultTasks,
      tasks,

      // Merge in caches.
      ...caches,
    });