# All files / src/utils get-self-scope.js

66.67% Statements 2/3
50% Branches 1/2
100% Functions 1/1
66.67% Lines 2/3

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

    9x

    9x

     export function getSelfScope () {
      // see https://stackoverflow.com/a/11237259/589493
      Iif (typeof window === 'undefined') {
        /* eslint-disable-next-line no-undef */
        return self;
      } else {
        return window;
      }
    }